mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-90cf79a997b582bf/out/
paparazzi.rs

1#![doc = "MAVLink paparazzi dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    MAV_CMD_NAV_WAYPOINT = 16,
1399    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1400    MAV_CMD_NAV_LOITER_UNLIM = 17,
1401    #[doc = "Loiter around this waypoint for X turns"]
1402    MAV_CMD_NAV_LOITER_TURNS = 18,
1403    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1404    MAV_CMD_NAV_LOITER_TIME = 19,
1405    #[doc = "Return to launch location"]
1406    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1407    #[doc = "Land at location."]
1408    MAV_CMD_NAV_LAND = 21,
1409    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1410    MAV_CMD_NAV_TAKEOFF = 22,
1411    #[doc = "Land at local position (local frame only)"]
1412    MAV_CMD_NAV_LAND_LOCAL = 23,
1413    #[doc = "Takeoff from local position (local frame only)"]
1414    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1415    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1416    MAV_CMD_NAV_FOLLOW = 25,
1417    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1418    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1419    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1420    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1421    #[doc = "Begin following a target"]
1422    MAV_CMD_DO_FOLLOW = 32,
1423    #[doc = "Reposition the MAV after a follow target command has been sent"]
1424    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1425    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1426    MAV_CMD_DO_ORBIT = 34,
1427    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1428    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1429    MAV_CMD_NAV_ROI = 80,
1430    #[doc = "Control autonomous path planning on the MAV."]
1431    MAV_CMD_NAV_PATHPLANNING = 81,
1432    #[doc = "Navigate to waypoint using a spline path."]
1433    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1434    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1435    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1436    #[doc = "Land using VTOL mode"]
1437    MAV_CMD_NAV_VTOL_LAND = 85,
1438    #[doc = "hand control over to an external controller"]
1439    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1440    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1441    MAV_CMD_NAV_DELAY = 93,
1442    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1443    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1444    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1445    MAV_CMD_NAV_LAST = 95,
1446    #[doc = "Delay mission state machine."]
1447    MAV_CMD_CONDITION_DELAY = 112,
1448    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1449    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1450    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1451    MAV_CMD_CONDITION_DISTANCE = 114,
1452    #[doc = "Reach a certain target angle."]
1453    MAV_CMD_CONDITION_YAW = 115,
1454    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1455    MAV_CMD_CONDITION_LAST = 159,
1456    #[doc = "Set system mode."]
1457    MAV_CMD_DO_SET_MODE = 176,
1458    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1459    MAV_CMD_DO_JUMP = 177,
1460    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1461    MAV_CMD_DO_CHANGE_SPEED = 178,
1462    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1463    MAV_CMD_DO_SET_HOME = 179,
1464    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1465    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1466    MAV_CMD_DO_SET_PARAMETER = 180,
1467    #[doc = "Set a relay to a condition."]
1468    MAV_CMD_DO_SET_RELAY = 181,
1469    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1470    MAV_CMD_DO_REPEAT_RELAY = 182,
1471    #[doc = "Set a servo to a desired PWM value."]
1472    MAV_CMD_DO_SET_SERVO = 183,
1473    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1474    MAV_CMD_DO_REPEAT_SERVO = 184,
1475    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1476    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1477    #[doc = "Change altitude set point."]
1478    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1479    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1480    MAV_CMD_DO_SET_ACTUATOR = 187,
1481    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1482    MAV_CMD_DO_RETURN_PATH_START = 188,
1483    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1484    MAV_CMD_DO_LAND_START = 189,
1485    #[doc = "Mission command to perform a landing from a rally point."]
1486    MAV_CMD_DO_RALLY_LAND = 190,
1487    #[doc = "Mission command to safely abort an autonomous landing."]
1488    MAV_CMD_DO_GO_AROUND = 191,
1489    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1490    MAV_CMD_DO_REPOSITION = 192,
1491    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1492    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1493    #[doc = "Set moving direction to forward or reverse."]
1494    MAV_CMD_DO_SET_REVERSE = 194,
1495    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1496    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1497    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1499    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1500    MAV_CMD_DO_SET_ROI_NONE = 197,
1501    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1502    MAV_CMD_DO_SET_ROI_SYSID = 198,
1503    #[doc = "Control onboard camera system."]
1504    MAV_CMD_DO_CONTROL_VIDEO = 200,
1505    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1506    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1507    MAV_CMD_DO_SET_ROI = 201,
1508    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1509    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1510    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1512    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1513    #[doc = "Mission command to configure a camera or antenna mount"]
1514    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1515    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to control a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONTROL = 205,
1518    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1519    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1520    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1521    MAV_CMD_DO_FENCE_ENABLE = 207,
1522    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1523    MAV_CMD_DO_PARACHUTE = 208,
1524    #[doc = "Command to perform motor test."]
1525    MAV_CMD_DO_MOTOR_TEST = 209,
1526    #[doc = "Change to/from inverted flight."]
1527    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1528    #[doc = "Mission command to operate a gripper."]
1529    MAV_CMD_DO_GRIPPER = 211,
1530    #[doc = "Enable/disable autotune."]
1531    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1532    #[doc = "Sets a desired vehicle turn angle and speed change."]
1533    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1534    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1535    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1536    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1537    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1538    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1539    #[doc = "set id of master controller"]
1540    MAV_CMD_DO_GUIDED_MASTER = 221,
1541    #[doc = "Set limits for external control"]
1542    MAV_CMD_DO_GUIDED_LIMITS = 222,
1543    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1544    MAV_CMD_DO_ENGINE_CONTROL = 223,
1545    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1546    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1547    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1548    MAV_CMD_DO_LAST = 240,
1549    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1550    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1551    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1552    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1553    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1554    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1555    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1556    MAV_CMD_PREFLIGHT_STORAGE = 245,
1557    #[doc = "Request the reboot or shutdown of system components."]
1558    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1559    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1560    MAV_CMD_OVERRIDE_GOTO = 252,
1561    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1562    MAV_CMD_OBLIQUE_SURVEY = 260,
1563    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1564    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1565    #[doc = "start running a mission"]
1566    MAV_CMD_MISSION_START = 300,
1567    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1568    MAV_CMD_ACTUATOR_TEST = 310,
1569    #[doc = "Actuator configuration command."]
1570    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1571    #[doc = "Arms / Disarms a component"]
1572    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1573    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1574    MAV_CMD_RUN_PREARM_CHECKS = 401,
1575    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1576    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1577    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1580    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1581    MAV_CMD_GET_HOME_POSITION = 410,
1582    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1583    MAV_CMD_INJECT_FAILURE = 420,
1584    #[doc = "Starts receiver pairing."]
1585    MAV_CMD_START_RX_PAIR = 500,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1587    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1588    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1589    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1590    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1591    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1592    MAV_CMD_REQUEST_MESSAGE = 512,
1593    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1594    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1595    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1598    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1601    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1604    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1607    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1608    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_STORAGE_FORMAT = 526,
1610    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1611    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1612    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1615    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1616    #[doc = "Reset all camera settings to Factory Default"]
1617    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1618    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1619    MAV_CMD_SET_CAMERA_MODE = 530,
1620    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1621    MAV_CMD_SET_CAMERA_ZOOM = 531,
1622    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_FOCUS = 532,
1624    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1625    MAV_CMD_SET_STORAGE_USAGE = 533,
1626    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1627    MAV_CMD_SET_CAMERA_SOURCE = 534,
1628    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1629    MAV_CMD_JUMP_TAG = 600,
1630    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1631    MAV_CMD_DO_JUMP_TAG = 601,
1632    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1633    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1634    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1636    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1637    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1638    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1640    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1641    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1642    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1643    #[doc = "Enable or disable on-board camera triggering system."]
1644    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1645    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1646    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1647    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1649    #[doc = "Stops ongoing tracking."]
1650    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1651    #[doc = "Starts video capture (recording)."]
1652    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1653    #[doc = "Stop the current video capture (recording)."]
1654    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1655    #[doc = "Start video streaming"]
1656    MAV_CMD_VIDEO_START_STREAMING = 2502,
1657    #[doc = "Stop the given video stream"]
1658    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1659    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1660    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1661    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1665    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1666    MAV_CMD_LOGGING_START = 2510,
1667    #[doc = "Request to stop streaming log data over MAVLink"]
1668    MAV_CMD_LOGGING_STOP = 2511,
1669    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1670    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1671    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1672    #[doc = "Create a panorama at the current position"]
1673    MAV_CMD_PANORAMA_CREATE = 2800,
1674    #[doc = "Request VTOL transition"]
1675    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1676    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1677    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1678    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1679    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1680    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1682    #[doc = "Delay mission state machine until gate has been reached."]
1683    MAV_CMD_CONDITION_GATE = 4501,
1684    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1685    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1686    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1687    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1688    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1690    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1691    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1692    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1694    #[doc = "Rally point. You can have multiple rally points defined."]
1695    MAV_CMD_NAV_RALLY_POINT = 5100,
1696    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1697    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1698    #[doc = "Change state of safety switch."]
1699    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1700    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1701    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1702    #[deprecated = "  (Deprecated since 2021-06)"]
1703    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1704    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Control the payload deployment."]
1707    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1708    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1709    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1710    #[doc = "Command to operate winch."]
1711    MAV_CMD_DO_WINCH = 42600,
1712    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1713    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1714    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1715    MAV_CMD_WAYPOINT_USER_1 = 31000,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_2 = 31001,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_3 = 31002,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_4 = 31003,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_5 = 31004,
1724    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1725    MAV_CMD_SPATIAL_USER_1 = 31005,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_2 = 31006,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_3 = 31007,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_4 = 31008,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_5 = 31009,
1734    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1735    MAV_CMD_USER_1 = 31010,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_2 = 31011,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_3 = 31012,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_4 = 31013,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_5 = 31014,
1744    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1745    MAV_CMD_CAN_FORWARD = 32000,
1746}
1747impl MavCmd {
1748    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1749}
1750impl Default for MavCmd {
1751    fn default() -> Self {
1752        Self::DEFAULT
1753    }
1754}
1755#[cfg_attr(feature = "ts", derive(TS))]
1756#[cfg_attr(feature = "ts", ts(export))]
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Possible actions an aircraft can take to avoid a collision."]
1763pub enum MavCollisionAction {
1764    #[doc = "Ignore any potential collisions"]
1765    MAV_COLLISION_ACTION_NONE = 0,
1766    #[doc = "Report potential collision"]
1767    MAV_COLLISION_ACTION_REPORT = 1,
1768    #[doc = "Ascend or Descend to avoid threat"]
1769    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1770    #[doc = "Move horizontally to avoid threat"]
1771    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1772    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1773    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1774    #[doc = "Aircraft to fly directly back to its launch point"]
1775    MAV_COLLISION_ACTION_RTL = 5,
1776    #[doc = "Aircraft to stop in place"]
1777    MAV_COLLISION_ACTION_HOVER = 6,
1778}
1779impl MavCollisionAction {
1780    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1781}
1782impl Default for MavCollisionAction {
1783    fn default() -> Self {
1784        Self::DEFAULT
1785    }
1786}
1787#[cfg_attr(feature = "ts", derive(TS))]
1788#[cfg_attr(feature = "ts", ts(export))]
1789#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1791#[cfg_attr(feature = "serde", serde(tag = "type"))]
1792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1793#[repr(u32)]
1794#[doc = "Source of information about this collision."]
1795pub enum MavCollisionSrc {
1796    #[doc = "ID field references ADSB_VEHICLE packets"]
1797    MAV_COLLISION_SRC_ADSB = 0,
1798    #[doc = "ID field references MAVLink SRC ID"]
1799    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1800}
1801impl MavCollisionSrc {
1802    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1803}
1804impl Default for MavCollisionSrc {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Aircraft-rated danger from this threat."]
1817pub enum MavCollisionThreatLevel {
1818    #[doc = "Not a threat"]
1819    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1820    #[doc = "Craft is mildly concerned about this threat"]
1821    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1822    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1823    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1824}
1825impl MavCollisionThreatLevel {
1826    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1827}
1828impl Default for MavCollisionThreatLevel {
1829    fn default() -> Self {
1830        Self::DEFAULT
1831    }
1832}
1833#[cfg_attr(feature = "ts", derive(TS))]
1834#[cfg_attr(feature = "ts", ts(export))]
1835#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1837#[cfg_attr(feature = "serde", serde(tag = "type"))]
1838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1839#[repr(u32)]
1840#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1841pub enum MavComponent {
1842    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1843    MAV_COMP_ID_ALL = 0,
1844    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1845    MAV_COMP_ID_AUTOPILOT1 = 1,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER1 = 25,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER2 = 26,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER3 = 27,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER4 = 28,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER5 = 29,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER6 = 30,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER7 = 31,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER8 = 32,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER9 = 33,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER10 = 34,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER11 = 35,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER12 = 36,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER13 = 37,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER14 = 38,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER15 = 39,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER16 = 40,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER17 = 41,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER18 = 42,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER19 = 43,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER20 = 44,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER21 = 45,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER22 = 46,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER23 = 47,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER24 = 48,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER25 = 49,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER26 = 50,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER27 = 51,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER28 = 52,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER29 = 53,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER30 = 54,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER31 = 55,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER32 = 56,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER33 = 57,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER34 = 58,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER35 = 59,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER36 = 60,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER37 = 61,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER38 = 62,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER39 = 63,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER40 = 64,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER41 = 65,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER42 = 66,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER43 = 67,
1932    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1933    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER45 = 69,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER46 = 70,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER47 = 71,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER48 = 72,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER49 = 73,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER50 = 74,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER51 = 75,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER52 = 76,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER53 = 77,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER54 = 78,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER55 = 79,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER56 = 80,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER57 = 81,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER58 = 82,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER59 = 83,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER60 = 84,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER61 = 85,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER62 = 86,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER63 = 87,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER64 = 88,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER65 = 89,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER66 = 90,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER67 = 91,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER68 = 92,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER69 = 93,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER70 = 94,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER71 = 95,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER72 = 96,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER73 = 97,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER74 = 98,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER75 = 99,
1996    #[doc = "Camera #1."]
1997    MAV_COMP_ID_CAMERA = 100,
1998    #[doc = "Camera #2."]
1999    MAV_COMP_ID_CAMERA2 = 101,
2000    #[doc = "Camera #3."]
2001    MAV_COMP_ID_CAMERA3 = 102,
2002    #[doc = "Camera #4."]
2003    MAV_COMP_ID_CAMERA4 = 103,
2004    #[doc = "Camera #5."]
2005    MAV_COMP_ID_CAMERA5 = 104,
2006    #[doc = "Camera #6."]
2007    MAV_COMP_ID_CAMERA6 = 105,
2008    #[doc = "Servo #1."]
2009    MAV_COMP_ID_SERVO1 = 140,
2010    #[doc = "Servo #2."]
2011    MAV_COMP_ID_SERVO2 = 141,
2012    #[doc = "Servo #3."]
2013    MAV_COMP_ID_SERVO3 = 142,
2014    #[doc = "Servo #4."]
2015    MAV_COMP_ID_SERVO4 = 143,
2016    #[doc = "Servo #5."]
2017    MAV_COMP_ID_SERVO5 = 144,
2018    #[doc = "Servo #6."]
2019    MAV_COMP_ID_SERVO6 = 145,
2020    #[doc = "Servo #7."]
2021    MAV_COMP_ID_SERVO7 = 146,
2022    #[doc = "Servo #8."]
2023    MAV_COMP_ID_SERVO8 = 147,
2024    #[doc = "Servo #9."]
2025    MAV_COMP_ID_SERVO9 = 148,
2026    #[doc = "Servo #10."]
2027    MAV_COMP_ID_SERVO10 = 149,
2028    #[doc = "Servo #11."]
2029    MAV_COMP_ID_SERVO11 = 150,
2030    #[doc = "Servo #12."]
2031    MAV_COMP_ID_SERVO12 = 151,
2032    #[doc = "Servo #13."]
2033    MAV_COMP_ID_SERVO13 = 152,
2034    #[doc = "Servo #14."]
2035    MAV_COMP_ID_SERVO14 = 153,
2036    #[doc = "Gimbal #1."]
2037    MAV_COMP_ID_GIMBAL = 154,
2038    #[doc = "Logging component."]
2039    MAV_COMP_ID_LOG = 155,
2040    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2041    MAV_COMP_ID_ADSB = 156,
2042    #[doc = "On Screen Display (OSD) devices for video links."]
2043    MAV_COMP_ID_OSD = 157,
2044    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2045    MAV_COMP_ID_PERIPHERAL = 158,
2046    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2047    #[doc = "Gimbal ID for QX1."]
2048    MAV_COMP_ID_QX1_GIMBAL = 159,
2049    #[doc = "FLARM collision alert component."]
2050    MAV_COMP_ID_FLARM = 160,
2051    #[doc = "Parachute component."]
2052    MAV_COMP_ID_PARACHUTE = 161,
2053    #[doc = "Winch component."]
2054    MAV_COMP_ID_WINCH = 169,
2055    #[doc = "Gimbal #2."]
2056    MAV_COMP_ID_GIMBAL2 = 171,
2057    #[doc = "Gimbal #3."]
2058    MAV_COMP_ID_GIMBAL3 = 172,
2059    #[doc = "Gimbal #4"]
2060    MAV_COMP_ID_GIMBAL4 = 173,
2061    #[doc = "Gimbal #5."]
2062    MAV_COMP_ID_GIMBAL5 = 174,
2063    #[doc = "Gimbal #6."]
2064    MAV_COMP_ID_GIMBAL6 = 175,
2065    #[doc = "Battery #1."]
2066    MAV_COMP_ID_BATTERY = 180,
2067    #[doc = "Battery #2."]
2068    MAV_COMP_ID_BATTERY2 = 181,
2069    #[doc = "CAN over MAVLink client."]
2070    MAV_COMP_ID_MAVCAN = 189,
2071    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2072    MAV_COMP_ID_MISSIONPLANNER = 190,
2073    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2074    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2081    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2082    MAV_COMP_ID_PATHPLANNER = 195,
2083    #[doc = "Component that plans a collision free path between two points."]
2084    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2085    #[doc = "Component that provides position estimates using VIO techniques."]
2086    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2087    #[doc = "Component that manages pairing of vehicle and GCS."]
2088    MAV_COMP_ID_PAIRING_MANAGER = 198,
2089    #[doc = "Inertial Measurement Unit (IMU) #1."]
2090    MAV_COMP_ID_IMU = 200,
2091    #[doc = "Inertial Measurement Unit (IMU) #2."]
2092    MAV_COMP_ID_IMU_2 = 201,
2093    #[doc = "Inertial Measurement Unit (IMU) #3."]
2094    MAV_COMP_ID_IMU_3 = 202,
2095    #[doc = "GPS #1."]
2096    MAV_COMP_ID_GPS = 220,
2097    #[doc = "GPS #2."]
2098    MAV_COMP_ID_GPS2 = 221,
2099    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2100    MAV_COMP_ID_ODID_TXRX_1 = 236,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_2 = 237,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_3 = 238,
2105    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2106    MAV_COMP_ID_UDP_BRIDGE = 240,
2107    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2108    MAV_COMP_ID_UART_BRIDGE = 241,
2109    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2110    MAV_COMP_ID_TUNNEL_NODE = 242,
2111    #[doc = "Illuminator"]
2112    MAV_COMP_ID_ILLUMINATOR = 243,
2113    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2114    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2115    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2116}
2117impl MavComponent {
2118    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2119}
2120impl Default for MavComponent {
2121    fn default() -> Self {
2122        Self::DEFAULT
2123    }
2124}
2125#[cfg_attr(feature = "ts", derive(TS))]
2126#[cfg_attr(feature = "ts", ts(export))]
2127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2129#[cfg_attr(feature = "serde", serde(tag = "type"))]
2130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2131#[repr(u32)]
2132#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2133#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2134pub enum MavDataStream {
2135    #[doc = "Enable all data streams"]
2136    MAV_DATA_STREAM_ALL = 0,
2137    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2138    MAV_DATA_STREAM_RAW_SENSORS = 1,
2139    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2140    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2141    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2142    MAV_DATA_STREAM_RC_CHANNELS = 3,
2143    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2144    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2145    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2146    MAV_DATA_STREAM_POSITION = 6,
2147    #[doc = "Dependent on the autopilot"]
2148    MAV_DATA_STREAM_EXTRA1 = 10,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA2 = 11,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA3 = 12,
2153}
2154impl MavDataStream {
2155    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2156}
2157impl Default for MavDataStream {
2158    fn default() -> Self {
2159        Self::DEFAULT
2160    }
2161}
2162#[cfg_attr(feature = "ts", derive(TS))]
2163#[cfg_attr(feature = "ts", ts(export))]
2164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2166#[cfg_attr(feature = "serde", serde(tag = "type"))]
2167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2168#[repr(u32)]
2169#[doc = "Enumeration of distance sensor types"]
2170pub enum MavDistanceSensor {
2171    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2172    MAV_DISTANCE_SENSOR_LASER = 0,
2173    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2174    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2175    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2176    MAV_DISTANCE_SENSOR_INFRARED = 2,
2177    #[doc = "Radar type, e.g. uLanding units"]
2178    MAV_DISTANCE_SENSOR_RADAR = 3,
2179    #[doc = "Broken or unknown type, e.g. analog units"]
2180    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2181}
2182impl MavDistanceSensor {
2183    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2184}
2185impl Default for MavDistanceSensor {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[cfg_attr(feature = "ts", derive(TS))]
2191#[cfg_attr(feature = "ts", ts(export))]
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2198pub enum MavDoRepositionFlags {
2199    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2200    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2201}
2202impl MavDoRepositionFlags {
2203    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2204}
2205impl Default for MavDoRepositionFlags {
2206    fn default() -> Self {
2207        Self::DEFAULT
2208    }
2209}
2210#[cfg_attr(feature = "ts", derive(TS))]
2211#[cfg_attr(feature = "ts", ts(export))]
2212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2214#[cfg_attr(feature = "serde", serde(tag = "type"))]
2215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2216#[repr(u32)]
2217#[doc = "Enumeration of estimator types"]
2218pub enum MavEstimatorType {
2219    #[doc = "Unknown type of the estimator."]
2220    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2221    #[doc = "This is a naive estimator without any real covariance feedback."]
2222    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2223    #[doc = "Computer vision based estimate. Might be up to scale."]
2224    MAV_ESTIMATOR_TYPE_VISION = 2,
2225    #[doc = "Visual-inertial estimate."]
2226    MAV_ESTIMATOR_TYPE_VIO = 3,
2227    #[doc = "Plain GPS estimate."]
2228    MAV_ESTIMATOR_TYPE_GPS = 4,
2229    #[doc = "Estimator integrating GPS and inertial sensing."]
2230    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2231    #[doc = "Estimate from external motion capturing system."]
2232    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2233    #[doc = "Estimator based on lidar sensor input."]
2234    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2235    #[doc = "Estimator on autopilot."]
2236    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2237}
2238impl MavEstimatorType {
2239    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2240}
2241impl Default for MavEstimatorType {
2242    fn default() -> Self {
2243        Self::DEFAULT
2244    }
2245}
2246#[cfg_attr(feature = "ts", derive(TS))]
2247#[cfg_attr(feature = "ts", ts(export))]
2248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2250#[cfg_attr(feature = "serde", serde(tag = "type"))]
2251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2252#[repr(u32)]
2253#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2254pub enum MavEventCurrentSequenceFlags {
2255    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2256    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2257}
2258impl MavEventCurrentSequenceFlags {
2259    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2260}
2261impl Default for MavEventCurrentSequenceFlags {
2262    fn default() -> Self {
2263        Self::DEFAULT
2264    }
2265}
2266#[cfg_attr(feature = "ts", derive(TS))]
2267#[cfg_attr(feature = "ts", ts(export))]
2268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2270#[cfg_attr(feature = "serde", serde(tag = "type"))]
2271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2272#[repr(u32)]
2273#[doc = "Reason for an event error response."]
2274pub enum MavEventErrorReason {
2275    #[doc = "The requested event is not available (anymore)."]
2276    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2277}
2278impl MavEventErrorReason {
2279    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2280}
2281impl Default for MavEventErrorReason {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2294pub enum MavFrame {
2295    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2296    MAV_FRAME_GLOBAL = 0,
2297    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2298    MAV_FRAME_LOCAL_NED = 1,
2299    #[doc = "NOT a coordinate frame, indicates a mission command."]
2300    MAV_FRAME_MISSION = 2,
2301    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2302    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2303    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2304    MAV_FRAME_LOCAL_ENU = 4,
2305    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2306    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2307    MAV_FRAME_GLOBAL_INT = 5,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2310    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2311    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2312    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2313    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2314    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2315    MAV_FRAME_BODY_NED = 8,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2318    MAV_FRAME_BODY_OFFSET_NED = 9,
2319    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2320    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2321    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2322    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2324    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2325    MAV_FRAME_BODY_FRD = 12,
2326    #[deprecated = "  (Deprecated since 2019-04)"]
2327    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2328    MAV_FRAME_RESERVED_13 = 13,
2329    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2331    MAV_FRAME_RESERVED_14 = 14,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2334    MAV_FRAME_RESERVED_15 = 15,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2337    MAV_FRAME_RESERVED_16 = 16,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2340    MAV_FRAME_RESERVED_17 = 17,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2343    MAV_FRAME_RESERVED_18 = 18,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2346    MAV_FRAME_RESERVED_19 = 19,
2347    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2348    MAV_FRAME_LOCAL_FRD = 20,
2349    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FLU = 21,
2351}
2352impl MavFrame {
2353    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2354}
2355impl Default for MavFrame {
2356    fn default() -> Self {
2357        Self::DEFAULT
2358    }
2359}
2360#[cfg_attr(feature = "ts", derive(TS))]
2361#[cfg_attr(feature = "ts", ts(export))]
2362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2364#[cfg_attr(feature = "serde", serde(tag = "type"))]
2365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2366#[repr(u32)]
2367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2368pub enum MavFtpErr {
2369    #[doc = "None: No error"]
2370    MAV_FTP_ERR_NONE = 0,
2371    #[doc = "Fail: Unknown failure"]
2372    MAV_FTP_ERR_FAIL = 1,
2373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2374    MAV_FTP_ERR_FAILERRNO = 2,
2375    #[doc = "InvalidDataSize: Payload size is invalid"]
2376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2377    #[doc = "InvalidSession: Session is not currently open"]
2378    MAV_FTP_ERR_INVALIDSESSION = 4,
2379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2382    MAV_FTP_ERR_EOF = 6,
2383    #[doc = "UnknownCommand: Unknown command / opcode"]
2384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2385    #[doc = "FileExists: File/directory already exists"]
2386    MAV_FTP_ERR_FILEEXISTS = 8,
2387    #[doc = "FileProtected: File/directory is write protected"]
2388    MAV_FTP_ERR_FILEPROTECTED = 9,
2389    #[doc = "FileNotFound: File/directory not found"]
2390    MAV_FTP_ERR_FILENOTFOUND = 10,
2391}
2392impl MavFtpErr {
2393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2394}
2395impl Default for MavFtpErr {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[cfg_attr(feature = "ts", derive(TS))]
2401#[cfg_attr(feature = "ts", ts(export))]
2402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2404#[cfg_attr(feature = "serde", serde(tag = "type"))]
2405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2406#[repr(u32)]
2407#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2408pub enum MavFtpOpcode {
2409    #[doc = "None. Ignored, always ACKed"]
2410    MAV_FTP_OPCODE_NONE = 0,
2411    #[doc = "TerminateSession: Terminates open Read session"]
2412    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2413    #[doc = "ResetSessions: Terminates all open read sessions"]
2414    MAV_FTP_OPCODE_RESETSESSION = 2,
2415    #[doc = "ListDirectory. List files and directories in path from offset"]
2416    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2417    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2418    MAV_FTP_OPCODE_OPENFILERO = 4,
2419    #[doc = "ReadFile: Reads size bytes from offset in session"]
2420    MAV_FTP_OPCODE_READFILE = 5,
2421    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2422    MAV_FTP_OPCODE_CREATEFILE = 6,
2423    #[doc = "WriteFile: Writes size bytes to offset in session"]
2424    MAV_FTP_OPCODE_WRITEFILE = 7,
2425    #[doc = "RemoveFile: Remove file at path"]
2426    MAV_FTP_OPCODE_REMOVEFILE = 8,
2427    #[doc = "CreateDirectory: Creates directory at path"]
2428    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2429    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2430    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2431    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2432    MAV_FTP_OPCODE_OPENFILEWO = 11,
2433    #[doc = "TruncateFile: Truncate file at path to offset length"]
2434    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2435    #[doc = "Rename: Rename path1 to path2"]
2436    MAV_FTP_OPCODE_RENAME = 13,
2437    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2438    MAV_FTP_OPCODE_CALCFILECRC = 14,
2439    #[doc = "BurstReadFile: Burst download session file"]
2440    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2441    #[doc = "ACK: ACK response"]
2442    MAV_FTP_OPCODE_ACK = 128,
2443    #[doc = "NAK: NAK response"]
2444    MAV_FTP_OPCODE_NAK = 129,
2445}
2446impl MavFtpOpcode {
2447    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2448}
2449impl Default for MavFtpOpcode {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2462pub enum MavFuelType {
2463    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2464    MAV_FUEL_TYPE_UNKNOWN = 0,
2465    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2466    MAV_FUEL_TYPE_LIQUID = 1,
2467    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2468    MAV_FUEL_TYPE_GAS = 2,
2469}
2470impl MavFuelType {
2471    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2472}
2473impl Default for MavFuelType {
2474    fn default() -> Self {
2475        Self::DEFAULT
2476    }
2477}
2478bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2479impl MavGeneratorStatusFlag {
2480    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2481}
2482impl Default for MavGeneratorStatusFlag {
2483    fn default() -> Self {
2484        Self::DEFAULT
2485    }
2486}
2487#[cfg_attr(feature = "ts", derive(TS))]
2488#[cfg_attr(feature = "ts", ts(export))]
2489#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2491#[cfg_attr(feature = "serde", serde(tag = "type"))]
2492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2493#[repr(u32)]
2494#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2495pub enum MavGoto {
2496    #[doc = "Hold at the current position."]
2497    MAV_GOTO_DO_HOLD = 0,
2498    #[doc = "Continue with the next item in mission execution."]
2499    MAV_GOTO_DO_CONTINUE = 1,
2500    #[doc = "Hold at the current position of the system"]
2501    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2502    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2503    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2504}
2505impl MavGoto {
2506    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2507}
2508impl Default for MavGoto {
2509    fn default() -> Self {
2510        Self::DEFAULT
2511    }
2512}
2513#[cfg_attr(feature = "ts", derive(TS))]
2514#[cfg_attr(feature = "ts", ts(export))]
2515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2517#[cfg_attr(feature = "serde", serde(tag = "type"))]
2518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2519#[repr(u32)]
2520#[doc = "Enumeration of landed detector states"]
2521pub enum MavLandedState {
2522    #[doc = "MAV landed state is unknown"]
2523    MAV_LANDED_STATE_UNDEFINED = 0,
2524    #[doc = "MAV is landed (on ground)"]
2525    MAV_LANDED_STATE_ON_GROUND = 1,
2526    #[doc = "MAV is in air"]
2527    MAV_LANDED_STATE_IN_AIR = 2,
2528    #[doc = "MAV currently taking off"]
2529    MAV_LANDED_STATE_TAKEOFF = 3,
2530    #[doc = "MAV currently landing"]
2531    MAV_LANDED_STATE_LANDING = 4,
2532}
2533impl MavLandedState {
2534    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2535}
2536impl Default for MavLandedState {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2549pub enum MavMissionResult {
2550    #[doc = "mission accepted OK"]
2551    MAV_MISSION_ACCEPTED = 0,
2552    #[doc = "Generic error / not accepting mission commands at all right now."]
2553    MAV_MISSION_ERROR = 1,
2554    #[doc = "Coordinate frame is not supported."]
2555    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2556    #[doc = "Command is not supported."]
2557    MAV_MISSION_UNSUPPORTED = 3,
2558    #[doc = "Mission items exceed storage space."]
2559    MAV_MISSION_NO_SPACE = 4,
2560    #[doc = "One of the parameters has an invalid value."]
2561    MAV_MISSION_INVALID = 5,
2562    #[doc = "param1 has an invalid value."]
2563    MAV_MISSION_INVALID_PARAM1 = 6,
2564    #[doc = "param2 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM2 = 7,
2566    #[doc = "param3 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM3 = 8,
2568    #[doc = "param4 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM4 = 9,
2570    #[doc = "x / param5 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM5_X = 10,
2572    #[doc = "y / param6 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM6_Y = 11,
2574    #[doc = "z / param7 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM7 = 12,
2576    #[doc = "Mission item received out of sequence"]
2577    MAV_MISSION_INVALID_SEQUENCE = 13,
2578    #[doc = "Not accepting any mission commands from this communication partner."]
2579    MAV_MISSION_DENIED = 14,
2580    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2581    MAV_MISSION_OPERATION_CANCELLED = 15,
2582}
2583impl MavMissionResult {
2584    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2585}
2586impl Default for MavMissionResult {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591#[cfg_attr(feature = "ts", derive(TS))]
2592#[cfg_attr(feature = "ts", ts(export))]
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[doc = "Type of mission items being requested/sent in mission protocol."]
2599pub enum MavMissionType {
2600    #[doc = "Items are mission commands for main mission."]
2601    MAV_MISSION_TYPE_MISSION = 0,
2602    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2603    MAV_MISSION_TYPE_FENCE = 1,
2604    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2605    MAV_MISSION_TYPE_RALLY = 2,
2606    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2607    MAV_MISSION_TYPE_ALL = 255,
2608}
2609impl MavMissionType {
2610    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2611}
2612impl Default for MavMissionType {
2613    fn default() -> Self {
2614        Self::DEFAULT
2615    }
2616}
2617#[cfg_attr(feature = "ts", derive(TS))]
2618#[cfg_attr(feature = "ts", ts(export))]
2619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2621#[cfg_attr(feature = "serde", serde(tag = "type"))]
2622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2623#[repr(u32)]
2624#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2625pub enum MavMode {
2626    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2627    MAV_MODE_PREFLIGHT = 0,
2628    #[doc = "System is allowed to be active, under assisted RC control."]
2629    MAV_MODE_STABILIZE_DISARMED = 80,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_ARMED = 208,
2632    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2633    MAV_MODE_MANUAL_DISARMED = 64,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_ARMED = 192,
2636    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2637    MAV_MODE_GUIDED_DISARMED = 88,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_ARMED = 216,
2640    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2641    MAV_MODE_AUTO_DISARMED = 92,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_ARMED = 220,
2644    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2645    MAV_MODE_TEST_DISARMED = 66,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_ARMED = 194,
2648}
2649impl MavMode {
2650    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2651}
2652impl Default for MavMode {
2653    fn default() -> Self {
2654        Self::DEFAULT
2655    }
2656}
2657bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2658impl MavModeFlag {
2659    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2660}
2661impl Default for MavModeFlag {
2662    fn default() -> Self {
2663        Self::DEFAULT
2664    }
2665}
2666#[cfg_attr(feature = "ts", derive(TS))]
2667#[cfg_attr(feature = "ts", ts(export))]
2668#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2670#[cfg_attr(feature = "serde", serde(tag = "type"))]
2671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2672#[repr(u32)]
2673#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2674pub enum MavModeFlagDecodePosition {
2675    #[doc = "First bit:  10000000"]
2676    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2677    #[doc = "Second bit: 01000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2679    #[doc = "Third bit:  00100000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2681    #[doc = "Fourth bit: 00010000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2683    #[doc = "Fifth bit:  00001000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2685    #[doc = "Sixth bit:   00000100"]
2686    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2687    #[doc = "Seventh bit: 00000010"]
2688    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2689    #[doc = "Eighth bit: 00000001"]
2690    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2691}
2692impl MavModeFlagDecodePosition {
2693    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2694}
2695impl Default for MavModeFlagDecodePosition {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2701impl MavModeProperty {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2703}
2704impl Default for MavModeProperty {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709#[cfg_attr(feature = "ts", derive(TS))]
2710#[cfg_attr(feature = "ts", ts(export))]
2711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2713#[cfg_attr(feature = "serde", serde(tag = "type"))]
2714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2715#[repr(u32)]
2716#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2717#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2718pub enum MavMountMode {
2719    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2720    MAV_MOUNT_MODE_RETRACT = 0,
2721    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2722    MAV_MOUNT_MODE_NEUTRAL = 1,
2723    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2724    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2725    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_RC_TARGETING = 3,
2727    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2728    MAV_MOUNT_MODE_GPS_POINT = 4,
2729    #[doc = "Gimbal tracks system with specified system ID"]
2730    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2731    #[doc = "Gimbal tracks home position"]
2732    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2733}
2734impl MavMountMode {
2735    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2736}
2737impl Default for MavMountMode {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[cfg_attr(feature = "ts", derive(TS))]
2743#[cfg_attr(feature = "ts", ts(export))]
2744#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2746#[cfg_attr(feature = "serde", serde(tag = "type"))]
2747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2748#[repr(u32)]
2749pub enum MavOdidArmStatus {
2750    #[doc = "Passing arming checks."]
2751    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2752    #[doc = "Generic arming failure, see error string for details."]
2753    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2754}
2755impl MavOdidArmStatus {
2756    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2757}
2758impl Default for MavOdidArmStatus {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770pub enum MavOdidAuthType {
2771    #[doc = "No authentication type is specified."]
2772    MAV_ODID_AUTH_TYPE_NONE = 0,
2773    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2774    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2775    #[doc = "Signature for the Operator ID."]
2776    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2777    #[doc = "Signature for the entire message set."]
2778    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2779    #[doc = "Authentication is provided by Network Remote ID."]
2780    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2781    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2782    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2783}
2784impl MavOdidAuthType {
2785    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2786}
2787impl Default for MavOdidAuthType {
2788    fn default() -> Self {
2789        Self::DEFAULT
2790    }
2791}
2792#[cfg_attr(feature = "ts", derive(TS))]
2793#[cfg_attr(feature = "ts", ts(export))]
2794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2796#[cfg_attr(feature = "serde", serde(tag = "type"))]
2797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2798#[repr(u32)]
2799pub enum MavOdidCategoryEu {
2800    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2801    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2802    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2803    MAV_ODID_CATEGORY_EU_OPEN = 1,
2804    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2805    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2806    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2807    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2808}
2809impl MavOdidCategoryEu {
2810    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2811}
2812impl Default for MavOdidCategoryEu {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidClassEu {
2825    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2826    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2827    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2828    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2830    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2832    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2834    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2836    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2838    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2840    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2841}
2842impl MavOdidClassEu {
2843    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2844}
2845impl Default for MavOdidClassEu {
2846    fn default() -> Self {
2847        Self::DEFAULT
2848    }
2849}
2850#[cfg_attr(feature = "ts", derive(TS))]
2851#[cfg_attr(feature = "ts", ts(export))]
2852#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2854#[cfg_attr(feature = "serde", serde(tag = "type"))]
2855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2856#[repr(u32)]
2857pub enum MavOdidClassificationType {
2858    #[doc = "The classification type for the UA is undeclared."]
2859    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2860    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2861    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2862}
2863impl MavOdidClassificationType {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2865}
2866impl Default for MavOdidClassificationType {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidDescType {
2879    #[doc = "Optional free-form text description of the purpose of the flight."]
2880    MAV_ODID_DESC_TYPE_TEXT = 0,
2881    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2882    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2883    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2885}
2886impl MavOdidDescType {
2887    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2888}
2889impl Default for MavOdidDescType {
2890    fn default() -> Self {
2891        Self::DEFAULT
2892    }
2893}
2894#[cfg_attr(feature = "ts", derive(TS))]
2895#[cfg_attr(feature = "ts", ts(export))]
2896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2898#[cfg_attr(feature = "serde", serde(tag = "type"))]
2899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2900#[repr(u32)]
2901pub enum MavOdidHeightRef {
2902    #[doc = "The height field is relative to the take-off location."]
2903    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2904    #[doc = "The height field is relative to ground."]
2905    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2906}
2907impl MavOdidHeightRef {
2908    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2909}
2910impl Default for MavOdidHeightRef {
2911    fn default() -> Self {
2912        Self::DEFAULT
2913    }
2914}
2915#[cfg_attr(feature = "ts", derive(TS))]
2916#[cfg_attr(feature = "ts", ts(export))]
2917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2919#[cfg_attr(feature = "serde", serde(tag = "type"))]
2920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2921#[repr(u32)]
2922pub enum MavOdidHorAcc {
2923    #[doc = "The horizontal accuracy is unknown."]
2924    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2925    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2926    MAV_ODID_HOR_ACC_10NM = 1,
2927    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2928    MAV_ODID_HOR_ACC_4NM = 2,
2929    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2930    MAV_ODID_HOR_ACC_2NM = 3,
2931    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2932    MAV_ODID_HOR_ACC_1NM = 4,
2933    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2934    MAV_ODID_HOR_ACC_0_5NM = 5,
2935    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2936    MAV_ODID_HOR_ACC_0_3NM = 6,
2937    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2938    MAV_ODID_HOR_ACC_0_1NM = 7,
2939    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2940    MAV_ODID_HOR_ACC_0_05NM = 8,
2941    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2942    MAV_ODID_HOR_ACC_30_METER = 9,
2943    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2944    MAV_ODID_HOR_ACC_10_METER = 10,
2945    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2946    MAV_ODID_HOR_ACC_3_METER = 11,
2947    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2948    MAV_ODID_HOR_ACC_1_METER = 12,
2949}
2950impl MavOdidHorAcc {
2951    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2952}
2953impl Default for MavOdidHorAcc {
2954    fn default() -> Self {
2955        Self::DEFAULT
2956    }
2957}
2958#[cfg_attr(feature = "ts", derive(TS))]
2959#[cfg_attr(feature = "ts", ts(export))]
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidIdType {
2966    #[doc = "No type defined."]
2967    MAV_ODID_ID_TYPE_NONE = 0,
2968    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2969    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2970    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2971    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2972    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2973    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2974    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2975    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2976}
2977impl MavOdidIdType {
2978    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2979}
2980impl Default for MavOdidIdType {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[cfg_attr(feature = "ts", derive(TS))]
2986#[cfg_attr(feature = "ts", ts(export))]
2987#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2989#[cfg_attr(feature = "serde", serde(tag = "type"))]
2990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2991#[repr(u32)]
2992pub enum MavOdidOperatorIdType {
2993    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2994    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2995}
2996impl MavOdidOperatorIdType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2998}
2999impl Default for MavOdidOperatorIdType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidOperatorLocationType {
3012    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3013    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3014    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3016    #[doc = "The location/altitude of the operator are fixed values."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3018}
3019impl MavOdidOperatorLocationType {
3020    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3021}
3022impl Default for MavOdidOperatorLocationType {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidSpeedAcc {
3035    #[doc = "The speed accuracy is unknown."]
3036    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3037    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3038    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3039    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3040    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3041    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3042    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3043    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3044    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3045}
3046impl MavOdidSpeedAcc {
3047    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3048}
3049impl Default for MavOdidSpeedAcc {
3050    fn default() -> Self {
3051        Self::DEFAULT
3052    }
3053}
3054#[cfg_attr(feature = "ts", derive(TS))]
3055#[cfg_attr(feature = "ts", ts(export))]
3056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3058#[cfg_attr(feature = "serde", serde(tag = "type"))]
3059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3060#[repr(u32)]
3061pub enum MavOdidStatus {
3062    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3063    MAV_ODID_STATUS_UNDECLARED = 0,
3064    #[doc = "The UA is on the ground."]
3065    MAV_ODID_STATUS_GROUND = 1,
3066    #[doc = "The UA is in the air."]
3067    MAV_ODID_STATUS_AIRBORNE = 2,
3068    #[doc = "The UA is having an emergency."]
3069    MAV_ODID_STATUS_EMERGENCY = 3,
3070    #[doc = "The remote ID system is failing or unreliable in some way."]
3071    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3072}
3073impl MavOdidStatus {
3074    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3075}
3076impl Default for MavOdidStatus {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidTimeAcc {
3089    #[doc = "The timestamp accuracy is unknown."]
3090    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3091    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3092    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3094    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3096    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3098    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3100    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3102    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3104    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3106    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3108    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3110    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3112    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3114    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3116    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3118    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3120    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3121}
3122impl MavOdidTimeAcc {
3123    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3124}
3125impl Default for MavOdidTimeAcc {
3126    fn default() -> Self {
3127        Self::DEFAULT
3128    }
3129}
3130#[cfg_attr(feature = "ts", derive(TS))]
3131#[cfg_attr(feature = "ts", ts(export))]
3132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3134#[cfg_attr(feature = "serde", serde(tag = "type"))]
3135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3136#[repr(u32)]
3137pub enum MavOdidUaType {
3138    #[doc = "No UA (Unmanned Aircraft) type defined."]
3139    MAV_ODID_UA_TYPE_NONE = 0,
3140    #[doc = "Aeroplane/Airplane. Fixed wing."]
3141    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3142    #[doc = "Helicopter or multirotor."]
3143    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3144    #[doc = "Gyroplane."]
3145    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3146    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3147    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3148    #[doc = "Ornithopter."]
3149    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3150    #[doc = "Glider."]
3151    MAV_ODID_UA_TYPE_GLIDER = 6,
3152    #[doc = "Kite."]
3153    MAV_ODID_UA_TYPE_KITE = 7,
3154    #[doc = "Free Balloon."]
3155    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3156    #[doc = "Captive Balloon."]
3157    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3158    #[doc = "Airship. E.g. a blimp."]
3159    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3160    #[doc = "Free Fall/Parachute (unpowered)."]
3161    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3162    #[doc = "Rocket."]
3163    MAV_ODID_UA_TYPE_ROCKET = 12,
3164    #[doc = "Tethered powered aircraft."]
3165    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3166    #[doc = "Ground Obstacle."]
3167    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3168    #[doc = "Other type of aircraft not listed earlier."]
3169    MAV_ODID_UA_TYPE_OTHER = 15,
3170}
3171impl MavOdidUaType {
3172    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3173}
3174impl Default for MavOdidUaType {
3175    fn default() -> Self {
3176        Self::DEFAULT
3177    }
3178}
3179#[cfg_attr(feature = "ts", derive(TS))]
3180#[cfg_attr(feature = "ts", ts(export))]
3181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3183#[cfg_attr(feature = "serde", serde(tag = "type"))]
3184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3185#[repr(u32)]
3186pub enum MavOdidVerAcc {
3187    #[doc = "The vertical accuracy is unknown."]
3188    MAV_ODID_VER_ACC_UNKNOWN = 0,
3189    #[doc = "The vertical accuracy is smaller than 150 meter."]
3190    MAV_ODID_VER_ACC_150_METER = 1,
3191    #[doc = "The vertical accuracy is smaller than 45 meter."]
3192    MAV_ODID_VER_ACC_45_METER = 2,
3193    #[doc = "The vertical accuracy is smaller than 25 meter."]
3194    MAV_ODID_VER_ACC_25_METER = 3,
3195    #[doc = "The vertical accuracy is smaller than 10 meter."]
3196    MAV_ODID_VER_ACC_10_METER = 4,
3197    #[doc = "The vertical accuracy is smaller than 3 meter."]
3198    MAV_ODID_VER_ACC_3_METER = 5,
3199    #[doc = "The vertical accuracy is smaller than 1 meter."]
3200    MAV_ODID_VER_ACC_1_METER = 6,
3201}
3202impl MavOdidVerAcc {
3203    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3204}
3205impl Default for MavOdidVerAcc {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[cfg_attr(feature = "ts", derive(TS))]
3211#[cfg_attr(feature = "ts", ts(export))]
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3218pub enum MavParamExtType {
3219    #[doc = "8-bit unsigned integer"]
3220    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3221    #[doc = "8-bit signed integer"]
3222    MAV_PARAM_EXT_TYPE_INT8 = 2,
3223    #[doc = "16-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3225    #[doc = "16-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT16 = 4,
3227    #[doc = "32-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3229    #[doc = "32-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT32 = 6,
3231    #[doc = "64-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3233    #[doc = "64-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT64 = 8,
3235    #[doc = "32-bit floating-point"]
3236    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3237    #[doc = "64-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3239    #[doc = "Custom Type"]
3240    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3241}
3242impl MavParamExtType {
3243    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3244}
3245impl Default for MavParamExtType {
3246    fn default() -> Self {
3247        Self::DEFAULT
3248    }
3249}
3250#[cfg_attr(feature = "ts", derive(TS))]
3251#[cfg_attr(feature = "ts", ts(export))]
3252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3254#[cfg_attr(feature = "serde", serde(tag = "type"))]
3255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3256#[repr(u32)]
3257#[doc = "Specifies the datatype of a MAVLink parameter."]
3258pub enum MavParamType {
3259    #[doc = "8-bit unsigned integer"]
3260    MAV_PARAM_TYPE_UINT8 = 1,
3261    #[doc = "8-bit signed integer"]
3262    MAV_PARAM_TYPE_INT8 = 2,
3263    #[doc = "16-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT16 = 3,
3265    #[doc = "16-bit signed integer"]
3266    MAV_PARAM_TYPE_INT16 = 4,
3267    #[doc = "32-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT32 = 5,
3269    #[doc = "32-bit signed integer"]
3270    MAV_PARAM_TYPE_INT32 = 6,
3271    #[doc = "64-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT64 = 7,
3273    #[doc = "64-bit signed integer"]
3274    MAV_PARAM_TYPE_INT64 = 8,
3275    #[doc = "32-bit floating-point"]
3276    MAV_PARAM_TYPE_REAL32 = 9,
3277    #[doc = "64-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL64 = 10,
3279}
3280impl MavParamType {
3281    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3282}
3283impl Default for MavParamType {
3284    fn default() -> Self {
3285        Self::DEFAULT
3286    }
3287}
3288bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3289impl MavPowerStatus {
3290    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3291}
3292impl Default for MavPowerStatus {
3293    fn default() -> Self {
3294        Self::DEFAULT
3295    }
3296}
3297bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3298impl MavProtocolCapability {
3299    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3300}
3301impl Default for MavProtocolCapability {
3302    fn default() -> Self {
3303        Self::DEFAULT
3304    }
3305}
3306#[cfg_attr(feature = "ts", derive(TS))]
3307#[cfg_attr(feature = "ts", ts(export))]
3308#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3310#[cfg_attr(feature = "serde", serde(tag = "type"))]
3311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3312#[repr(u32)]
3313#[doc = "Result from a MAVLink command (MAV_CMD)"]
3314pub enum MavResult {
3315    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3316    MAV_RESULT_ACCEPTED = 0,
3317    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3318    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3319    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3320    MAV_RESULT_DENIED = 2,
3321    #[doc = "Command is not supported (unknown)."]
3322    MAV_RESULT_UNSUPPORTED = 3,
3323    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3324    MAV_RESULT_FAILED = 4,
3325    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3326    MAV_RESULT_IN_PROGRESS = 5,
3327    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3328    MAV_RESULT_CANCELLED = 6,
3329    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3330    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3331    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3332    MAV_RESULT_COMMAND_INT_ONLY = 8,
3333    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3334    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3335}
3336impl MavResult {
3337    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3338}
3339impl Default for MavResult {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3352#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3353pub enum MavRoi {
3354    #[doc = "No region of interest."]
3355    MAV_ROI_NONE = 0,
3356    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3357    MAV_ROI_WPNEXT = 1,
3358    #[doc = "Point toward given waypoint."]
3359    MAV_ROI_WPINDEX = 2,
3360    #[doc = "Point toward fixed location."]
3361    MAV_ROI_LOCATION = 3,
3362    #[doc = "Point toward of given id."]
3363    MAV_ROI_TARGET = 4,
3364}
3365impl MavRoi {
3366    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3367}
3368impl Default for MavRoi {
3369    fn default() -> Self {
3370        Self::DEFAULT
3371    }
3372}
3373#[cfg_attr(feature = "ts", derive(TS))]
3374#[cfg_attr(feature = "ts", ts(export))]
3375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3377#[cfg_attr(feature = "serde", serde(tag = "type"))]
3378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3379#[repr(u32)]
3380#[doc = "Enumeration of sensor orientation, according to its rotations"]
3381pub enum MavSensorOrientation {
3382    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3383    MAV_SENSOR_ROTATION_NONE = 0,
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3385    MAV_SENSOR_ROTATION_YAW_45 = 1,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3387    MAV_SENSOR_ROTATION_YAW_90 = 2,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3389    MAV_SENSOR_ROTATION_YAW_135 = 3,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3391    MAV_SENSOR_ROTATION_YAW_180 = 4,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3393    MAV_SENSOR_ROTATION_YAW_225 = 5,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3395    MAV_SENSOR_ROTATION_YAW_270 = 6,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3397    MAV_SENSOR_ROTATION_YAW_315 = 7,
3398    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3399    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3401    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3406    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3407    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3408    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3409    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3414    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3415    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3417    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3422    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3423    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3425    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3430    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3431    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3432    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3434    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3435    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3438    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3439    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3440    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3442    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3444    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3446    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3448    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3450    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3452    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3454    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3458    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3459    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3460    #[doc = "Pitch: 315"]
3461    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3462    #[doc = "Roll: 90, Pitch: 315"]
3463    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3464    #[doc = "Custom orientation"]
3465    MAV_SENSOR_ROTATION_CUSTOM = 100,
3466}
3467impl MavSensorOrientation {
3468    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3469}
3470impl Default for MavSensorOrientation {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[cfg_attr(feature = "ts", derive(TS))]
3476#[cfg_attr(feature = "ts", ts(export))]
3477#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3479#[cfg_attr(feature = "serde", serde(tag = "type"))]
3480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3481#[repr(u32)]
3482#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3483pub enum MavSeverity {
3484    #[doc = "System is unusable. This is a \"panic\" condition."]
3485    MAV_SEVERITY_EMERGENCY = 0,
3486    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3487    MAV_SEVERITY_ALERT = 1,
3488    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3489    MAV_SEVERITY_CRITICAL = 2,
3490    #[doc = "Indicates an error in secondary/redundant systems."]
3491    MAV_SEVERITY_ERROR = 3,
3492    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3493    MAV_SEVERITY_WARNING = 4,
3494    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3495    MAV_SEVERITY_NOTICE = 5,
3496    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3497    MAV_SEVERITY_INFO = 6,
3498    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3499    MAV_SEVERITY_DEBUG = 7,
3500}
3501impl MavSeverity {
3502    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3503}
3504impl Default for MavSeverity {
3505    fn default() -> Self {
3506        Self::DEFAULT
3507    }
3508}
3509#[cfg_attr(feature = "ts", derive(TS))]
3510#[cfg_attr(feature = "ts", ts(export))]
3511#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3513#[cfg_attr(feature = "serde", serde(tag = "type"))]
3514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3515#[repr(u32)]
3516#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3517pub enum MavStandardMode {
3518    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3519    MAV_STANDARD_MODE_NON_STANDARD = 0,
3520    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3521    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3522    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_ORBIT = 2,
3524    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_CRUISE = 3,
3526    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3528    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3529    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3530    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3531    MAV_STANDARD_MODE_MISSION = 6,
3532    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3533    MAV_STANDARD_MODE_LAND = 7,
3534    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_TAKEOFF = 8,
3536}
3537impl MavStandardMode {
3538    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3539}
3540impl Default for MavStandardMode {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552pub enum MavState {
3553    #[doc = "Uninitialized system, state is unknown."]
3554    MAV_STATE_UNINIT = 0,
3555    #[doc = "System is booting up."]
3556    MAV_STATE_BOOT = 1,
3557    #[doc = "System is calibrating and not flight-ready."]
3558    MAV_STATE_CALIBRATING = 2,
3559    #[doc = "System is grounded and on standby. It can be launched any time."]
3560    MAV_STATE_STANDBY = 3,
3561    #[doc = "System is active and might be already airborne. Motors are engaged."]
3562    MAV_STATE_ACTIVE = 4,
3563    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3564    MAV_STATE_CRITICAL = 5,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3566    MAV_STATE_EMERGENCY = 6,
3567    #[doc = "System just initialized its power-down sequence, will shut down now."]
3568    MAV_STATE_POWEROFF = 7,
3569    #[doc = "System is terminating itself (failsafe or commanded)."]
3570    MAV_STATE_FLIGHT_TERMINATION = 8,
3571}
3572impl MavState {
3573    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3574}
3575impl Default for MavState {
3576    fn default() -> Self {
3577        Self::DEFAULT
3578    }
3579}
3580bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3581impl MavSysStatusSensor {
3582    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3583}
3584impl Default for MavSysStatusSensor {
3585    fn default() -> Self {
3586        Self::DEFAULT
3587    }
3588}
3589bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3590impl MavSysStatusSensorExtended {
3591    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3592}
3593impl Default for MavSysStatusSensorExtended {
3594    fn default() -> Self {
3595        Self::DEFAULT
3596    }
3597}
3598#[cfg_attr(feature = "ts", derive(TS))]
3599#[cfg_attr(feature = "ts", ts(export))]
3600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3602#[cfg_attr(feature = "serde", serde(tag = "type"))]
3603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3604#[repr(u32)]
3605pub enum MavTunnelPayloadType {
3606    #[doc = "Encoding of payload unknown."]
3607    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3608    #[doc = "Registered for STorM32 gimbal controller."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3628    #[doc = "Registered for ModalAI remote OSD protocol."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3630    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3632    #[doc = "Registered for ModalAI vendor use."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3634}
3635impl MavTunnelPayloadType {
3636    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3637}
3638impl Default for MavTunnelPayloadType {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643#[cfg_attr(feature = "ts", derive(TS))]
3644#[cfg_attr(feature = "ts", ts(export))]
3645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3647#[cfg_attr(feature = "serde", serde(tag = "type"))]
3648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3649#[repr(u32)]
3650#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3651pub enum MavType {
3652    #[doc = "Generic micro air vehicle"]
3653    MAV_TYPE_GENERIC = 0,
3654    #[doc = "Fixed wing aircraft."]
3655    MAV_TYPE_FIXED_WING = 1,
3656    #[doc = "Quadrotor"]
3657    MAV_TYPE_QUADROTOR = 2,
3658    #[doc = "Coaxial helicopter"]
3659    MAV_TYPE_COAXIAL = 3,
3660    #[doc = "Normal helicopter with tail rotor."]
3661    MAV_TYPE_HELICOPTER = 4,
3662    #[doc = "Ground installation"]
3663    MAV_TYPE_ANTENNA_TRACKER = 5,
3664    #[doc = "Operator control unit / ground control station"]
3665    MAV_TYPE_GCS = 6,
3666    #[doc = "Airship, controlled"]
3667    MAV_TYPE_AIRSHIP = 7,
3668    #[doc = "Free balloon, uncontrolled"]
3669    MAV_TYPE_FREE_BALLOON = 8,
3670    #[doc = "Rocket"]
3671    MAV_TYPE_ROCKET = 9,
3672    #[doc = "Ground rover"]
3673    MAV_TYPE_GROUND_ROVER = 10,
3674    #[doc = "Surface vessel, boat, ship"]
3675    MAV_TYPE_SURFACE_BOAT = 11,
3676    #[doc = "Submarine"]
3677    MAV_TYPE_SUBMARINE = 12,
3678    #[doc = "Hexarotor"]
3679    MAV_TYPE_HEXAROTOR = 13,
3680    #[doc = "Octorotor"]
3681    MAV_TYPE_OCTOROTOR = 14,
3682    #[doc = "Tricopter"]
3683    MAV_TYPE_TRICOPTER = 15,
3684    #[doc = "Flapping wing"]
3685    MAV_TYPE_FLAPPING_WING = 16,
3686    #[doc = "Kite"]
3687    MAV_TYPE_KITE = 17,
3688    #[doc = "Onboard companion controller"]
3689    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3690    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3691    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3692    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3694    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3695    MAV_TYPE_VTOL_TILTROTOR = 21,
3696    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3697    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3698    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3699    MAV_TYPE_VTOL_TAILSITTER = 23,
3700    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3701    MAV_TYPE_VTOL_TILTWING = 24,
3702    #[doc = "VTOL reserved 5"]
3703    MAV_TYPE_VTOL_RESERVED5 = 25,
3704    #[doc = "Gimbal"]
3705    MAV_TYPE_GIMBAL = 26,
3706    #[doc = "ADSB system"]
3707    MAV_TYPE_ADSB = 27,
3708    #[doc = "Steerable, nonrigid airfoil"]
3709    MAV_TYPE_PARAFOIL = 28,
3710    #[doc = "Dodecarotor"]
3711    MAV_TYPE_DODECAROTOR = 29,
3712    #[doc = "Camera"]
3713    MAV_TYPE_CAMERA = 30,
3714    #[doc = "Charging station"]
3715    MAV_TYPE_CHARGING_STATION = 31,
3716    #[doc = "FLARM collision avoidance system"]
3717    MAV_TYPE_FLARM = 32,
3718    #[doc = "Servo"]
3719    MAV_TYPE_SERVO = 33,
3720    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3721    MAV_TYPE_ODID = 34,
3722    #[doc = "Decarotor"]
3723    MAV_TYPE_DECAROTOR = 35,
3724    #[doc = "Battery"]
3725    MAV_TYPE_BATTERY = 36,
3726    #[doc = "Parachute"]
3727    MAV_TYPE_PARACHUTE = 37,
3728    #[doc = "Log"]
3729    MAV_TYPE_LOG = 38,
3730    #[doc = "OSD"]
3731    MAV_TYPE_OSD = 39,
3732    #[doc = "IMU"]
3733    MAV_TYPE_IMU = 40,
3734    #[doc = "GPS"]
3735    MAV_TYPE_GPS = 41,
3736    #[doc = "Winch"]
3737    MAV_TYPE_WINCH = 42,
3738    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3739    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3740    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3741    MAV_TYPE_ILLUMINATOR = 44,
3742    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3743    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3744}
3745impl MavType {
3746    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3747}
3748impl Default for MavType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "Enumeration of VTOL states"]
3761pub enum MavVtolState {
3762    #[doc = "MAV is not configured as VTOL"]
3763    MAV_VTOL_STATE_UNDEFINED = 0,
3764    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3765    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3766    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3767    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3768    #[doc = "VTOL is in multicopter state"]
3769    MAV_VTOL_STATE_MC = 3,
3770    #[doc = "VTOL is in fixed-wing state"]
3771    MAV_VTOL_STATE_FW = 4,
3772}
3773impl MavVtolState {
3774    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3775}
3776impl Default for MavVtolState {
3777    fn default() -> Self {
3778        Self::DEFAULT
3779    }
3780}
3781bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3782impl MavWinchStatusFlag {
3783    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3784}
3785impl Default for MavWinchStatusFlag {
3786    fn default() -> Self {
3787        Self::DEFAULT
3788    }
3789}
3790#[cfg_attr(feature = "ts", derive(TS))]
3791#[cfg_attr(feature = "ts", ts(export))]
3792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3794#[cfg_attr(feature = "serde", serde(tag = "type"))]
3795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3796#[repr(u32)]
3797pub enum MavlinkDataStreamType {
3798    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3799    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3800    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3801    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3802    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3803    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3804}
3805impl MavlinkDataStreamType {
3806    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3807}
3808impl Default for MavlinkDataStreamType {
3809    fn default() -> Self {
3810        Self::DEFAULT
3811    }
3812}
3813#[cfg_attr(feature = "ts", derive(TS))]
3814#[cfg_attr(feature = "ts", ts(export))]
3815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3817#[cfg_attr(feature = "serde", serde(tag = "type"))]
3818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3819#[repr(u32)]
3820#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3821pub enum MissionState {
3822    #[doc = "The mission status reporting is not supported."]
3823    MISSION_STATE_UNKNOWN = 0,
3824    #[doc = "No mission on the vehicle."]
3825    MISSION_STATE_NO_MISSION = 1,
3826    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3827    MISSION_STATE_NOT_STARTED = 2,
3828    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3829    MISSION_STATE_ACTIVE = 3,
3830    #[doc = "Mission is paused when in auto mode."]
3831    MISSION_STATE_PAUSED = 4,
3832    #[doc = "Mission has executed all mission items."]
3833    MISSION_STATE_COMPLETE = 5,
3834}
3835impl MissionState {
3836    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3837}
3838impl Default for MissionState {
3839    fn default() -> Self {
3840        Self::DEFAULT
3841    }
3842}
3843#[cfg_attr(feature = "ts", derive(TS))]
3844#[cfg_attr(feature = "ts", ts(export))]
3845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3847#[cfg_attr(feature = "serde", serde(tag = "type"))]
3848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3849#[repr(u32)]
3850#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3851pub enum MotorTestOrder {
3852    #[doc = "Default autopilot motor test method."]
3853    MOTOR_TEST_ORDER_DEFAULT = 0,
3854    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3855    MOTOR_TEST_ORDER_SEQUENCE = 1,
3856    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3857    MOTOR_TEST_ORDER_BOARD = 2,
3858}
3859impl MotorTestOrder {
3860    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3861}
3862impl Default for MotorTestOrder {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3875pub enum MotorTestThrottleType {
3876    #[doc = "Throttle as a percentage (0 ~ 100)"]
3877    MOTOR_TEST_THROTTLE_PERCENT = 0,
3878    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3879    MOTOR_TEST_THROTTLE_PWM = 1,
3880    #[doc = "Throttle pass-through from pilot's transmitter."]
3881    MOTOR_TEST_THROTTLE_PILOT = 2,
3882    #[doc = "Per-motor compass calibration test."]
3883    MOTOR_TEST_COMPASS_CAL = 3,
3884}
3885impl MotorTestThrottleType {
3886    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3887}
3888impl Default for MotorTestThrottleType {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[cfg_attr(feature = "ts", derive(TS))]
3894#[cfg_attr(feature = "ts", ts(export))]
3895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3897#[cfg_attr(feature = "serde", serde(tag = "type"))]
3898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3899#[repr(u32)]
3900pub enum NavVtolLandOptions {
3901    #[doc = "Default autopilot landing behaviour."]
3902    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3903    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3904    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3905    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3906    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3907}
3908impl NavVtolLandOptions {
3909    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3910}
3911impl Default for NavVtolLandOptions {
3912    fn default() -> Self {
3913        Self::DEFAULT
3914    }
3915}
3916#[cfg_attr(feature = "ts", derive(TS))]
3917#[cfg_attr(feature = "ts", ts(export))]
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923#[doc = "Yaw behaviour during orbit flight."]
3924pub enum OrbitYawBehaviour {
3925    #[doc = "Vehicle front points to the center (default)."]
3926    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3927    #[doc = "Vehicle front holds heading when message received."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3929    #[doc = "Yaw uncontrolled."]
3930    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3931    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3932    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3933    #[doc = "Yaw controlled by RC input."]
3934    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3935    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3936    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3937}
3938impl OrbitYawBehaviour {
3939    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3940}
3941impl Default for OrbitYawBehaviour {
3942    fn default() -> Self {
3943        Self::DEFAULT
3944    }
3945}
3946#[cfg_attr(feature = "ts", derive(TS))]
3947#[cfg_attr(feature = "ts", ts(export))]
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3954pub enum ParachuteAction {
3955    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3956    PARACHUTE_DISABLE = 0,
3957    #[doc = "Enable auto-release of parachute."]
3958    PARACHUTE_ENABLE = 1,
3959    #[doc = "Release parachute and kill motors."]
3960    PARACHUTE_RELEASE = 2,
3961}
3962impl ParachuteAction {
3963    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3964}
3965impl Default for ParachuteAction {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Result from PARAM_EXT_SET message."]
3978pub enum ParamAck {
3979    #[doc = "Parameter value ACCEPTED and SET"]
3980    PARAM_ACK_ACCEPTED = 0,
3981    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3982    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3983    #[doc = "Parameter failed to set"]
3984    PARAM_ACK_FAILED = 2,
3985    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3986    PARAM_ACK_IN_PROGRESS = 3,
3987}
3988impl ParamAck {
3989    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3990}
3991impl Default for ParamAck {
3992    fn default() -> Self {
3993        Self::DEFAULT
3994    }
3995}
3996bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3997impl PositionTargetTypemask {
3998    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3999}
4000impl Default for PositionTargetTypemask {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4013pub enum PrecisionLandMode {
4014    #[doc = "Normal (non-precision) landing."]
4015    PRECISION_LAND_MODE_DISABLED = 0,
4016    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4017    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4018    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4019    PRECISION_LAND_MODE_REQUIRED = 2,
4020}
4021impl PrecisionLandMode {
4022    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4023}
4024impl Default for PrecisionLandMode {
4025    fn default() -> Self {
4026        Self::DEFAULT
4027    }
4028}
4029#[cfg_attr(feature = "ts", derive(TS))]
4030#[cfg_attr(feature = "ts", ts(export))]
4031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4033#[cfg_attr(feature = "serde", serde(tag = "type"))]
4034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4035#[repr(u32)]
4036#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4037pub enum PreflightStorageMissionAction {
4038    #[doc = "Read current mission data from persistent storage"]
4039    MISSION_READ_PERSISTENT = 0,
4040    #[doc = "Write current mission data to persistent storage"]
4041    MISSION_WRITE_PERSISTENT = 1,
4042    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4043    MISSION_RESET_DEFAULT = 2,
4044}
4045impl PreflightStorageMissionAction {
4046    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4047}
4048impl Default for PreflightStorageMissionAction {
4049    fn default() -> Self {
4050        Self::DEFAULT
4051    }
4052}
4053#[cfg_attr(feature = "ts", derive(TS))]
4054#[cfg_attr(feature = "ts", ts(export))]
4055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4057#[cfg_attr(feature = "serde", serde(tag = "type"))]
4058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4059#[repr(u32)]
4060#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4061pub enum PreflightStorageParameterAction {
4062    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4063    PARAM_READ_PERSISTENT = 0,
4064    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4065    PARAM_WRITE_PERSISTENT = 1,
4066    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4067    PARAM_RESET_CONFIG_DEFAULT = 2,
4068    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4069    PARAM_RESET_SENSOR_DEFAULT = 3,
4070    #[doc = "Reset all parameters, including operation counters, to default values"]
4071    PARAM_RESET_ALL_DEFAULT = 4,
4072}
4073impl PreflightStorageParameterAction {
4074    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4075}
4076impl Default for PreflightStorageParameterAction {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4089pub enum RcSubType {
4090    #[doc = "Spektrum DSM2"]
4091    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4092    #[doc = "Spektrum DSMX"]
4093    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4094    #[doc = "Spektrum DSMX8"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4096}
4097impl RcSubType {
4098    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4099}
4100impl Default for RcSubType {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4113pub enum RcType {
4114    #[doc = "Spektrum"]
4115    RC_TYPE_SPEKTRUM = 0,
4116    #[doc = "CRSF"]
4117    RC_TYPE_CRSF = 1,
4118}
4119impl RcType {
4120    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4121}
4122impl Default for RcType {
4123    fn default() -> Self {
4124        Self::DEFAULT
4125    }
4126}
4127#[cfg_attr(feature = "ts", derive(TS))]
4128#[cfg_attr(feature = "ts", ts(export))]
4129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4131#[cfg_attr(feature = "serde", serde(tag = "type"))]
4132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4133#[repr(u32)]
4134#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4135pub enum RebootShutdownConditions {
4136    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4137    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4138    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4139    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4140}
4141impl RebootShutdownConditions {
4142    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4143}
4144impl Default for RebootShutdownConditions {
4145    fn default() -> Self {
4146        Self::DEFAULT
4147    }
4148}
4149#[cfg_attr(feature = "ts", derive(TS))]
4150#[cfg_attr(feature = "ts", ts(export))]
4151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4153#[cfg_attr(feature = "serde", serde(tag = "type"))]
4154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4155#[repr(u32)]
4156#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4157pub enum RtkBaselineCoordinateSystem {
4158    #[doc = "Earth-centered, Earth-fixed"]
4159    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4160    #[doc = "RTK basestation centered, north, east, down"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4162}
4163impl RtkBaselineCoordinateSystem {
4164    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4165}
4166impl Default for RtkBaselineCoordinateSystem {
4167    fn default() -> Self {
4168        Self::DEFAULT
4169    }
4170}
4171#[cfg_attr(feature = "ts", derive(TS))]
4172#[cfg_attr(feature = "ts", ts(export))]
4173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4175#[cfg_attr(feature = "serde", serde(tag = "type"))]
4176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4177#[repr(u32)]
4178#[doc = "Possible safety switch states."]
4179pub enum SafetySwitchState {
4180    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4181    SAFETY_SWITCH_STATE_SAFE = 0,
4182    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4183    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4184}
4185impl SafetySwitchState {
4186    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4187}
4188impl Default for SafetySwitchState {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "SERIAL_CONTROL device types"]
4201pub enum SerialControlDev {
4202    #[doc = "First telemetry port"]
4203    SERIAL_CONTROL_DEV_TELEM1 = 0,
4204    #[doc = "Second telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM2 = 1,
4206    #[doc = "First GPS port"]
4207    SERIAL_CONTROL_DEV_GPS1 = 2,
4208    #[doc = "Second GPS port"]
4209    SERIAL_CONTROL_DEV_GPS2 = 3,
4210    #[doc = "system shell"]
4211    SERIAL_CONTROL_DEV_SHELL = 10,
4212    #[doc = "SERIAL0"]
4213    SERIAL_CONTROL_SERIAL0 = 100,
4214    #[doc = "SERIAL1"]
4215    SERIAL_CONTROL_SERIAL1 = 101,
4216    #[doc = "SERIAL2"]
4217    SERIAL_CONTROL_SERIAL2 = 102,
4218    #[doc = "SERIAL3"]
4219    SERIAL_CONTROL_SERIAL3 = 103,
4220    #[doc = "SERIAL4"]
4221    SERIAL_CONTROL_SERIAL4 = 104,
4222    #[doc = "SERIAL5"]
4223    SERIAL_CONTROL_SERIAL5 = 105,
4224    #[doc = "SERIAL6"]
4225    SERIAL_CONTROL_SERIAL6 = 106,
4226    #[doc = "SERIAL7"]
4227    SERIAL_CONTROL_SERIAL7 = 107,
4228    #[doc = "SERIAL8"]
4229    SERIAL_CONTROL_SERIAL8 = 108,
4230    #[doc = "SERIAL9"]
4231    SERIAL_CONTROL_SERIAL9 = 109,
4232}
4233impl SerialControlDev {
4234    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4235}
4236impl Default for SerialControlDev {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4242impl SerialControlFlag {
4243    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4244}
4245impl Default for SerialControlFlag {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[cfg_attr(feature = "ts", derive(TS))]
4251#[cfg_attr(feature = "ts", ts(export))]
4252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4254#[cfg_attr(feature = "serde", serde(tag = "type"))]
4255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4256#[repr(u32)]
4257#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4258pub enum SetFocusType {
4259    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4260    FOCUS_TYPE_STEP = 0,
4261    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4262    FOCUS_TYPE_CONTINUOUS = 1,
4263    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4264    FOCUS_TYPE_RANGE = 2,
4265    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4266    FOCUS_TYPE_METERS = 3,
4267    #[doc = "Focus automatically."]
4268    FOCUS_TYPE_AUTO = 4,
4269    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4270    FOCUS_TYPE_AUTO_SINGLE = 5,
4271    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4272    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4273}
4274impl SetFocusType {
4275    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4276}
4277impl Default for SetFocusType {
4278    fn default() -> Self {
4279        Self::DEFAULT
4280    }
4281}
4282#[cfg_attr(feature = "ts", derive(TS))]
4283#[cfg_attr(feature = "ts", ts(export))]
4284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4286#[cfg_attr(feature = "serde", serde(tag = "type"))]
4287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4288#[repr(u32)]
4289#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4290pub enum SpeedType {
4291    #[doc = "Airspeed"]
4292    SPEED_TYPE_AIRSPEED = 0,
4293    #[doc = "Groundspeed"]
4294    SPEED_TYPE_GROUNDSPEED = 1,
4295    #[doc = "Climb speed"]
4296    SPEED_TYPE_CLIMB_SPEED = 2,
4297    #[doc = "Descent speed"]
4298    SPEED_TYPE_DESCENT_SPEED = 3,
4299}
4300impl SpeedType {
4301    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4302}
4303impl Default for SpeedType {
4304    fn default() -> Self {
4305        Self::DEFAULT
4306    }
4307}
4308#[cfg_attr(feature = "ts", derive(TS))]
4309#[cfg_attr(feature = "ts", ts(export))]
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Flags to indicate the status of camera storage."]
4316pub enum StorageStatus {
4317    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4318    STORAGE_STATUS_EMPTY = 0,
4319    #[doc = "Storage present but unformatted."]
4320    STORAGE_STATUS_UNFORMATTED = 1,
4321    #[doc = "Storage present and ready."]
4322    STORAGE_STATUS_READY = 2,
4323    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4324    STORAGE_STATUS_NOT_SUPPORTED = 3,
4325}
4326impl StorageStatus {
4327    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4328}
4329impl Default for StorageStatus {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Flags to indicate the type of storage."]
4342pub enum StorageType {
4343    #[doc = "Storage type is not known."]
4344    STORAGE_TYPE_UNKNOWN = 0,
4345    #[doc = "Storage type is USB device."]
4346    STORAGE_TYPE_USB_STICK = 1,
4347    #[doc = "Storage type is SD card."]
4348    STORAGE_TYPE_SD = 2,
4349    #[doc = "Storage type is microSD card."]
4350    STORAGE_TYPE_MICROSD = 3,
4351    #[doc = "Storage type is CFast."]
4352    STORAGE_TYPE_CF = 4,
4353    #[doc = "Storage type is CFexpress."]
4354    STORAGE_TYPE_CFE = 5,
4355    #[doc = "Storage type is XQD."]
4356    STORAGE_TYPE_XQD = 6,
4357    #[doc = "Storage type is HD mass storage type."]
4358    STORAGE_TYPE_HD = 7,
4359    #[doc = "Storage type is other, not listed type."]
4360    STORAGE_TYPE_OTHER = 254,
4361}
4362impl StorageType {
4363    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4364}
4365impl Default for StorageType {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4371impl StorageUsageFlag {
4372    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4373}
4374impl Default for StorageUsageFlag {
4375    fn default() -> Self {
4376        Self::DEFAULT
4377    }
4378}
4379#[cfg_attr(feature = "ts", derive(TS))]
4380#[cfg_attr(feature = "ts", ts(export))]
4381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4383#[cfg_attr(feature = "serde", serde(tag = "type"))]
4384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4385#[repr(u32)]
4386#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4387pub enum TuneFormat {
4388    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4389    TUNE_FORMAT_QBASIC1_1 = 1,
4390    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4391    TUNE_FORMAT_MML_MODERN = 2,
4392}
4393impl TuneFormat {
4394    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4395}
4396impl Default for TuneFormat {
4397    fn default() -> Self {
4398        Self::DEFAULT
4399    }
4400}
4401#[cfg_attr(feature = "ts", derive(TS))]
4402#[cfg_attr(feature = "ts", ts(export))]
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Generalized UAVCAN node health"]
4409pub enum UavcanNodeHealth {
4410    #[doc = "The node is functioning properly."]
4411    UAVCAN_NODE_HEALTH_OK = 0,
4412    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4413    UAVCAN_NODE_HEALTH_WARNING = 1,
4414    #[doc = "The node has encountered a major failure."]
4415    UAVCAN_NODE_HEALTH_ERROR = 2,
4416    #[doc = "The node has suffered a fatal malfunction."]
4417    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4418}
4419impl UavcanNodeHealth {
4420    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4421}
4422impl Default for UavcanNodeHealth {
4423    fn default() -> Self {
4424        Self::DEFAULT
4425    }
4426}
4427#[cfg_attr(feature = "ts", derive(TS))]
4428#[cfg_attr(feature = "ts", ts(export))]
4429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4431#[cfg_attr(feature = "serde", serde(tag = "type"))]
4432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4433#[repr(u32)]
4434#[doc = "Generalized UAVCAN node mode"]
4435pub enum UavcanNodeMode {
4436    #[doc = "The node is performing its primary functions."]
4437    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4438    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4439    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4440    #[doc = "The node is under maintenance."]
4441    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4442    #[doc = "The node is in the process of updating its software."]
4443    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4444    #[doc = "The node is no longer available online."]
4445    UAVCAN_NODE_MODE_OFFLINE = 7,
4446}
4447impl UavcanNodeMode {
4448    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4449}
4450impl Default for UavcanNodeMode {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4456impl UtmDataAvailFlags {
4457    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4458}
4459impl Default for UtmDataAvailFlags {
4460    fn default() -> Self {
4461        Self::DEFAULT
4462    }
4463}
4464#[cfg_attr(feature = "ts", derive(TS))]
4465#[cfg_attr(feature = "ts", ts(export))]
4466#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4468#[cfg_attr(feature = "serde", serde(tag = "type"))]
4469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4470#[repr(u32)]
4471#[doc = "Airborne status of UAS."]
4472pub enum UtmFlightState {
4473    #[doc = "The flight state can't be determined."]
4474    UTM_FLIGHT_STATE_UNKNOWN = 1,
4475    #[doc = "UAS on ground."]
4476    UTM_FLIGHT_STATE_GROUND = 2,
4477    #[doc = "UAS airborne."]
4478    UTM_FLIGHT_STATE_AIRBORNE = 3,
4479    #[doc = "UAS is in an emergency flight state."]
4480    UTM_FLIGHT_STATE_EMERGENCY = 16,
4481    #[doc = "UAS has no active controls."]
4482    UTM_FLIGHT_STATE_NOCTRL = 32,
4483}
4484impl UtmFlightState {
4485    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4486}
4487impl Default for UtmFlightState {
4488    fn default() -> Self {
4489        Self::DEFAULT
4490    }
4491}
4492#[cfg_attr(feature = "ts", derive(TS))]
4493#[cfg_attr(feature = "ts", ts(export))]
4494#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4496#[cfg_attr(feature = "serde", serde(tag = "type"))]
4497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4498#[repr(u32)]
4499#[doc = "Video stream encodings"]
4500pub enum VideoStreamEncoding {
4501    #[doc = "Stream encoding is unknown"]
4502    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4503    #[doc = "Stream encoding is H.264"]
4504    VIDEO_STREAM_ENCODING_H264 = 1,
4505    #[doc = "Stream encoding is H.265"]
4506    VIDEO_STREAM_ENCODING_H265 = 2,
4507}
4508impl VideoStreamEncoding {
4509    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4510}
4511impl Default for VideoStreamEncoding {
4512    fn default() -> Self {
4513        Self::DEFAULT
4514    }
4515}
4516bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4517impl VideoStreamStatusFlags {
4518    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4519}
4520impl Default for VideoStreamStatusFlags {
4521    fn default() -> Self {
4522        Self::DEFAULT
4523    }
4524}
4525#[cfg_attr(feature = "ts", derive(TS))]
4526#[cfg_attr(feature = "ts", ts(export))]
4527#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4529#[cfg_attr(feature = "serde", serde(tag = "type"))]
4530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4531#[repr(u32)]
4532#[doc = "Video stream types"]
4533pub enum VideoStreamType {
4534    #[doc = "Stream is RTSP"]
4535    VIDEO_STREAM_TYPE_RTSP = 0,
4536    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4537    VIDEO_STREAM_TYPE_RTPUDP = 1,
4538    #[doc = "Stream is MPEG on TCP"]
4539    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4540    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4541    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4542}
4543impl VideoStreamType {
4544    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4545}
4546impl Default for VideoStreamType {
4547    fn default() -> Self {
4548        Self::DEFAULT
4549    }
4550}
4551#[cfg_attr(feature = "ts", derive(TS))]
4552#[cfg_attr(feature = "ts", ts(export))]
4553#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4555#[cfg_attr(feature = "serde", serde(tag = "type"))]
4556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4557#[repr(u32)]
4558#[doc = "Direction of VTOL transition"]
4559pub enum VtolTransitionHeading {
4560    #[doc = "Respect the heading configuration of the vehicle."]
4561    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4562    #[doc = "Use the heading pointing towards the next waypoint."]
4563    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4564    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4565    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4566    #[doc = "Use the specified heading in parameter 4."]
4567    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4568    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4569    VTOL_TRANSITION_HEADING_ANY = 4,
4570}
4571impl VtolTransitionHeading {
4572    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4573}
4574impl Default for VtolTransitionHeading {
4575    fn default() -> Self {
4576        Self::DEFAULT
4577    }
4578}
4579#[cfg_attr(feature = "ts", derive(TS))]
4580#[cfg_attr(feature = "ts", ts(export))]
4581#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4583#[cfg_attr(feature = "serde", serde(tag = "type"))]
4584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4585#[repr(u32)]
4586#[doc = "WiFi Mode."]
4587pub enum WifiConfigApMode {
4588    #[doc = "WiFi mode is undefined."]
4589    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4590    #[doc = "WiFi configured as an access point."]
4591    WIFI_CONFIG_AP_MODE_AP = 1,
4592    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4593    WIFI_CONFIG_AP_MODE_STATION = 2,
4594    #[doc = "WiFi disabled."]
4595    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4596}
4597impl WifiConfigApMode {
4598    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4599}
4600impl Default for WifiConfigApMode {
4601    fn default() -> Self {
4602        Self::DEFAULT
4603    }
4604}
4605#[cfg_attr(feature = "ts", derive(TS))]
4606#[cfg_attr(feature = "ts", ts(export))]
4607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4609#[cfg_attr(feature = "serde", serde(tag = "type"))]
4610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4611#[repr(u32)]
4612#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4613pub enum WifiConfigApResponse {
4614    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4615    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4616    #[doc = "Changes accepted."]
4617    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4618    #[doc = "Changes rejected."]
4619    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4620    #[doc = "Invalid Mode."]
4621    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4622    #[doc = "Invalid SSID."]
4623    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4624    #[doc = "Invalid Password."]
4625    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4626}
4627impl WifiConfigApResponse {
4628    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4629}
4630impl Default for WifiConfigApResponse {
4631    fn default() -> Self {
4632        Self::DEFAULT
4633    }
4634}
4635#[cfg_attr(feature = "ts", derive(TS))]
4636#[cfg_attr(feature = "ts", ts(export))]
4637#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4639#[cfg_attr(feature = "serde", serde(tag = "type"))]
4640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4641#[repr(u32)]
4642#[doc = "Winch actions."]
4643pub enum WinchActions {
4644    #[doc = "Allow motor to freewheel."]
4645    WINCH_RELAXED = 0,
4646    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4647    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4648    #[doc = "Wind or unwind line at specified rate."]
4649    WINCH_RATE_CONTROL = 2,
4650    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4651    WINCH_LOCK = 3,
4652    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_DELIVER = 4,
4654    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_HOLD = 5,
4656    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_RETRACT = 6,
4658    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_LOAD_LINE = 7,
4660    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_ABANDON_LINE = 8,
4662    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4663    WINCH_LOAD_PAYLOAD = 9,
4664}
4665impl WinchActions {
4666    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4667}
4668impl Default for WinchActions {
4669    fn default() -> Self {
4670        Self::DEFAULT
4671    }
4672}
4673#[doc = "Set the vehicle attitude and body angular rates."]
4674#[doc = ""]
4675#[doc = "ID: 140"]
4676#[derive(Debug, Clone, PartialEq)]
4677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4679#[cfg_attr(feature = "ts", derive(TS))]
4680#[cfg_attr(feature = "ts", ts(export))]
4681pub struct ACTUATOR_CONTROL_TARGET_DATA {
4682    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4683    pub time_usec: u64,
4684    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4687    pub controls: [f32; 8],
4688    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4689    pub group_mlx: u8,
4690}
4691impl ACTUATOR_CONTROL_TARGET_DATA {
4692    pub const ENCODED_LEN: usize = 41usize;
4693    pub const DEFAULT: Self = Self {
4694        time_usec: 0_u64,
4695        controls: [0.0_f32; 8usize],
4696        group_mlx: 0_u8,
4697    };
4698    #[cfg(feature = "arbitrary")]
4699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4700        use arbitrary::{Arbitrary, Unstructured};
4701        let mut buf = [0u8; 1024];
4702        rng.fill_bytes(&mut buf);
4703        let mut unstructured = Unstructured::new(&buf);
4704        Self::arbitrary(&mut unstructured).unwrap_or_default()
4705    }
4706}
4707impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4708    fn default() -> Self {
4709        Self::DEFAULT.clone()
4710    }
4711}
4712impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4713    type Message = MavMessage;
4714    const ID: u32 = 140u32;
4715    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4716    const EXTRA_CRC: u8 = 181u8;
4717    const ENCODED_LEN: usize = 41usize;
4718    fn deser(
4719        _version: MavlinkVersion,
4720        __input: &[u8],
4721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4722        let avail_len = __input.len();
4723        let mut payload_buf = [0; Self::ENCODED_LEN];
4724        let mut buf = if avail_len < Self::ENCODED_LEN {
4725            payload_buf[0..avail_len].copy_from_slice(__input);
4726            Bytes::new(&payload_buf)
4727        } else {
4728            Bytes::new(__input)
4729        };
4730        let mut __struct = Self::default();
4731        __struct.time_usec = buf.get_u64_le();
4732        for v in &mut __struct.controls {
4733            let val = buf.get_f32_le();
4734            *v = val;
4735        }
4736        __struct.group_mlx = buf.get_u8();
4737        Ok(__struct)
4738    }
4739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4740        let mut __tmp = BytesMut::new(bytes);
4741        #[allow(clippy::absurd_extreme_comparisons)]
4742        #[allow(unused_comparisons)]
4743        if __tmp.remaining() < Self::ENCODED_LEN {
4744            panic!(
4745                "buffer is too small (need {} bytes, but got {})",
4746                Self::ENCODED_LEN,
4747                __tmp.remaining(),
4748            )
4749        }
4750        __tmp.put_u64_le(self.time_usec);
4751        for val in &self.controls {
4752            __tmp.put_f32_le(*val);
4753        }
4754        __tmp.put_u8(self.group_mlx);
4755        if matches!(version, MavlinkVersion::V2) {
4756            let len = __tmp.len();
4757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4758        } else {
4759            __tmp.len()
4760        }
4761    }
4762}
4763#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4764#[doc = ""]
4765#[doc = "ID: 375"]
4766#[derive(Debug, Clone, PartialEq)]
4767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4769#[cfg_attr(feature = "ts", derive(TS))]
4770#[cfg_attr(feature = "ts", ts(export))]
4771pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4772    #[doc = "Timestamp (since system boot)."]
4773    pub time_usec: u64,
4774    #[doc = "Active outputs"]
4775    pub active: u32,
4776    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4779    pub actuator: [f32; 32],
4780}
4781impl ACTUATOR_OUTPUT_STATUS_DATA {
4782    pub const ENCODED_LEN: usize = 140usize;
4783    pub const DEFAULT: Self = Self {
4784        time_usec: 0_u64,
4785        active: 0_u32,
4786        actuator: [0.0_f32; 32usize],
4787    };
4788    #[cfg(feature = "arbitrary")]
4789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4790        use arbitrary::{Arbitrary, Unstructured};
4791        let mut buf = [0u8; 1024];
4792        rng.fill_bytes(&mut buf);
4793        let mut unstructured = Unstructured::new(&buf);
4794        Self::arbitrary(&mut unstructured).unwrap_or_default()
4795    }
4796}
4797impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4798    fn default() -> Self {
4799        Self::DEFAULT.clone()
4800    }
4801}
4802impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4803    type Message = MavMessage;
4804    const ID: u32 = 375u32;
4805    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4806    const EXTRA_CRC: u8 = 251u8;
4807    const ENCODED_LEN: usize = 140usize;
4808    fn deser(
4809        _version: MavlinkVersion,
4810        __input: &[u8],
4811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4812        let avail_len = __input.len();
4813        let mut payload_buf = [0; Self::ENCODED_LEN];
4814        let mut buf = if avail_len < Self::ENCODED_LEN {
4815            payload_buf[0..avail_len].copy_from_slice(__input);
4816            Bytes::new(&payload_buf)
4817        } else {
4818            Bytes::new(__input)
4819        };
4820        let mut __struct = Self::default();
4821        __struct.time_usec = buf.get_u64_le();
4822        __struct.active = buf.get_u32_le();
4823        for v in &mut __struct.actuator {
4824            let val = buf.get_f32_le();
4825            *v = val;
4826        }
4827        Ok(__struct)
4828    }
4829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4830        let mut __tmp = BytesMut::new(bytes);
4831        #[allow(clippy::absurd_extreme_comparisons)]
4832        #[allow(unused_comparisons)]
4833        if __tmp.remaining() < Self::ENCODED_LEN {
4834            panic!(
4835                "buffer is too small (need {} bytes, but got {})",
4836                Self::ENCODED_LEN,
4837                __tmp.remaining(),
4838            )
4839        }
4840        __tmp.put_u64_le(self.time_usec);
4841        __tmp.put_u32_le(self.active);
4842        for val in &self.actuator {
4843            __tmp.put_f32_le(*val);
4844        }
4845        if matches!(version, MavlinkVersion::V2) {
4846            let len = __tmp.len();
4847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4848        } else {
4849            __tmp.len()
4850        }
4851    }
4852}
4853#[doc = "The location and information of an ADSB vehicle."]
4854#[doc = ""]
4855#[doc = "ID: 246"]
4856#[derive(Debug, Clone, PartialEq)]
4857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4859#[cfg_attr(feature = "ts", derive(TS))]
4860#[cfg_attr(feature = "ts", ts(export))]
4861pub struct ADSB_VEHICLE_DATA {
4862    #[doc = "ICAO address"]
4863    pub ICAO_address: u32,
4864    #[doc = "Latitude"]
4865    pub lat: i32,
4866    #[doc = "Longitude"]
4867    pub lon: i32,
4868    #[doc = "Altitude(ASL)"]
4869    pub altitude: i32,
4870    #[doc = "Course over ground"]
4871    pub heading: u16,
4872    #[doc = "The horizontal velocity"]
4873    pub hor_velocity: u16,
4874    #[doc = "The vertical velocity. Positive is up"]
4875    pub ver_velocity: i16,
4876    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4877    pub flags: AdsbFlags,
4878    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4879    pub squawk: u16,
4880    #[doc = "ADSB altitude type."]
4881    pub altitude_type: AdsbAltitudeType,
4882    #[doc = "The callsign, 8+null"]
4883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4884    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4885    pub callsign: [u8; 9],
4886    #[doc = "ADSB emitter type."]
4887    pub emitter_type: AdsbEmitterType,
4888    #[doc = "Time since last communication in seconds"]
4889    pub tslc: u8,
4890}
4891impl ADSB_VEHICLE_DATA {
4892    pub const ENCODED_LEN: usize = 38usize;
4893    pub const DEFAULT: Self = Self {
4894        ICAO_address: 0_u32,
4895        lat: 0_i32,
4896        lon: 0_i32,
4897        altitude: 0_i32,
4898        heading: 0_u16,
4899        hor_velocity: 0_u16,
4900        ver_velocity: 0_i16,
4901        flags: AdsbFlags::DEFAULT,
4902        squawk: 0_u16,
4903        altitude_type: AdsbAltitudeType::DEFAULT,
4904        callsign: [0_u8; 9usize],
4905        emitter_type: AdsbEmitterType::DEFAULT,
4906        tslc: 0_u8,
4907    };
4908    #[cfg(feature = "arbitrary")]
4909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4910        use arbitrary::{Arbitrary, Unstructured};
4911        let mut buf = [0u8; 1024];
4912        rng.fill_bytes(&mut buf);
4913        let mut unstructured = Unstructured::new(&buf);
4914        Self::arbitrary(&mut unstructured).unwrap_or_default()
4915    }
4916}
4917impl Default for ADSB_VEHICLE_DATA {
4918    fn default() -> Self {
4919        Self::DEFAULT.clone()
4920    }
4921}
4922impl MessageData for ADSB_VEHICLE_DATA {
4923    type Message = MavMessage;
4924    const ID: u32 = 246u32;
4925    const NAME: &'static str = "ADSB_VEHICLE";
4926    const EXTRA_CRC: u8 = 184u8;
4927    const ENCODED_LEN: usize = 38usize;
4928    fn deser(
4929        _version: MavlinkVersion,
4930        __input: &[u8],
4931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4932        let avail_len = __input.len();
4933        let mut payload_buf = [0; Self::ENCODED_LEN];
4934        let mut buf = if avail_len < Self::ENCODED_LEN {
4935            payload_buf[0..avail_len].copy_from_slice(__input);
4936            Bytes::new(&payload_buf)
4937        } else {
4938            Bytes::new(__input)
4939        };
4940        let mut __struct = Self::default();
4941        __struct.ICAO_address = buf.get_u32_le();
4942        __struct.lat = buf.get_i32_le();
4943        __struct.lon = buf.get_i32_le();
4944        __struct.altitude = buf.get_i32_le();
4945        __struct.heading = buf.get_u16_le();
4946        __struct.hor_velocity = buf.get_u16_le();
4947        __struct.ver_velocity = buf.get_i16_le();
4948        let tmp = buf.get_u16_le();
4949        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4950            ::mavlink_core::error::ParserError::InvalidFlag {
4951                flag_type: "AdsbFlags",
4952                value: tmp as u32,
4953            },
4954        )?;
4955        __struct.squawk = buf.get_u16_le();
4956        let tmp = buf.get_u8();
4957        __struct.altitude_type =
4958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4959                enum_type: "AdsbAltitudeType",
4960                value: tmp as u32,
4961            })?;
4962        for v in &mut __struct.callsign {
4963            let val = buf.get_u8();
4964            *v = val;
4965        }
4966        let tmp = buf.get_u8();
4967        __struct.emitter_type =
4968            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4969                enum_type: "AdsbEmitterType",
4970                value: tmp as u32,
4971            })?;
4972        __struct.tslc = buf.get_u8();
4973        Ok(__struct)
4974    }
4975    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4976        let mut __tmp = BytesMut::new(bytes);
4977        #[allow(clippy::absurd_extreme_comparisons)]
4978        #[allow(unused_comparisons)]
4979        if __tmp.remaining() < Self::ENCODED_LEN {
4980            panic!(
4981                "buffer is too small (need {} bytes, but got {})",
4982                Self::ENCODED_LEN,
4983                __tmp.remaining(),
4984            )
4985        }
4986        __tmp.put_u32_le(self.ICAO_address);
4987        __tmp.put_i32_le(self.lat);
4988        __tmp.put_i32_le(self.lon);
4989        __tmp.put_i32_le(self.altitude);
4990        __tmp.put_u16_le(self.heading);
4991        __tmp.put_u16_le(self.hor_velocity);
4992        __tmp.put_i16_le(self.ver_velocity);
4993        __tmp.put_u16_le(self.flags.bits());
4994        __tmp.put_u16_le(self.squawk);
4995        __tmp.put_u8(self.altitude_type as u8);
4996        for val in &self.callsign {
4997            __tmp.put_u8(*val);
4998        }
4999        __tmp.put_u8(self.emitter_type as u8);
5000        __tmp.put_u8(self.tslc);
5001        if matches!(version, MavlinkVersion::V2) {
5002            let len = __tmp.len();
5003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5004        } else {
5005            __tmp.len()
5006        }
5007    }
5008}
5009#[doc = "The location and information of an AIS vessel."]
5010#[doc = ""]
5011#[doc = "ID: 301"]
5012#[derive(Debug, Clone, PartialEq)]
5013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5015#[cfg_attr(feature = "ts", derive(TS))]
5016#[cfg_attr(feature = "ts", ts(export))]
5017pub struct AIS_VESSEL_DATA {
5018    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5019    pub MMSI: u32,
5020    #[doc = "Latitude"]
5021    pub lat: i32,
5022    #[doc = "Longitude"]
5023    pub lon: i32,
5024    #[doc = "Course over ground"]
5025    pub COG: u16,
5026    #[doc = "True heading"]
5027    pub heading: u16,
5028    #[doc = "Speed over ground"]
5029    pub velocity: u16,
5030    #[doc = "Distance from lat/lon location to bow"]
5031    pub dimension_bow: u16,
5032    #[doc = "Distance from lat/lon location to stern"]
5033    pub dimension_stern: u16,
5034    #[doc = "Time since last communication in seconds"]
5035    pub tslc: u16,
5036    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5037    pub flags: AisFlags,
5038    #[doc = "Turn rate"]
5039    pub turn_rate: i8,
5040    #[doc = "Navigational status"]
5041    pub navigational_status: AisNavStatus,
5042    #[doc = "Type of vessels"]
5043    pub mavtype: AisType,
5044    #[doc = "Distance from lat/lon location to port side"]
5045    pub dimension_port: u8,
5046    #[doc = "Distance from lat/lon location to starboard side"]
5047    pub dimension_starboard: u8,
5048    #[doc = "The vessel callsign"]
5049    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5050    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5051    pub callsign: [u8; 7],
5052    #[doc = "The vessel name"]
5053    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5054    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5055    pub name: [u8; 20],
5056}
5057impl AIS_VESSEL_DATA {
5058    pub const ENCODED_LEN: usize = 58usize;
5059    pub const DEFAULT: Self = Self {
5060        MMSI: 0_u32,
5061        lat: 0_i32,
5062        lon: 0_i32,
5063        COG: 0_u16,
5064        heading: 0_u16,
5065        velocity: 0_u16,
5066        dimension_bow: 0_u16,
5067        dimension_stern: 0_u16,
5068        tslc: 0_u16,
5069        flags: AisFlags::DEFAULT,
5070        turn_rate: 0_i8,
5071        navigational_status: AisNavStatus::DEFAULT,
5072        mavtype: AisType::DEFAULT,
5073        dimension_port: 0_u8,
5074        dimension_starboard: 0_u8,
5075        callsign: [0_u8; 7usize],
5076        name: [0_u8; 20usize],
5077    };
5078    #[cfg(feature = "arbitrary")]
5079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5080        use arbitrary::{Arbitrary, Unstructured};
5081        let mut buf = [0u8; 1024];
5082        rng.fill_bytes(&mut buf);
5083        let mut unstructured = Unstructured::new(&buf);
5084        Self::arbitrary(&mut unstructured).unwrap_or_default()
5085    }
5086}
5087impl Default for AIS_VESSEL_DATA {
5088    fn default() -> Self {
5089        Self::DEFAULT.clone()
5090    }
5091}
5092impl MessageData for AIS_VESSEL_DATA {
5093    type Message = MavMessage;
5094    const ID: u32 = 301u32;
5095    const NAME: &'static str = "AIS_VESSEL";
5096    const EXTRA_CRC: u8 = 243u8;
5097    const ENCODED_LEN: usize = 58usize;
5098    fn deser(
5099        _version: MavlinkVersion,
5100        __input: &[u8],
5101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5102        let avail_len = __input.len();
5103        let mut payload_buf = [0; Self::ENCODED_LEN];
5104        let mut buf = if avail_len < Self::ENCODED_LEN {
5105            payload_buf[0..avail_len].copy_from_slice(__input);
5106            Bytes::new(&payload_buf)
5107        } else {
5108            Bytes::new(__input)
5109        };
5110        let mut __struct = Self::default();
5111        __struct.MMSI = buf.get_u32_le();
5112        __struct.lat = buf.get_i32_le();
5113        __struct.lon = buf.get_i32_le();
5114        __struct.COG = buf.get_u16_le();
5115        __struct.heading = buf.get_u16_le();
5116        __struct.velocity = buf.get_u16_le();
5117        __struct.dimension_bow = buf.get_u16_le();
5118        __struct.dimension_stern = buf.get_u16_le();
5119        __struct.tslc = buf.get_u16_le();
5120        let tmp = buf.get_u16_le();
5121        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5122            ::mavlink_core::error::ParserError::InvalidFlag {
5123                flag_type: "AisFlags",
5124                value: tmp as u32,
5125            },
5126        )?;
5127        __struct.turn_rate = buf.get_i8();
5128        let tmp = buf.get_u8();
5129        __struct.navigational_status =
5130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5131                enum_type: "AisNavStatus",
5132                value: tmp as u32,
5133            })?;
5134        let tmp = buf.get_u8();
5135        __struct.mavtype =
5136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5137                enum_type: "AisType",
5138                value: tmp as u32,
5139            })?;
5140        __struct.dimension_port = buf.get_u8();
5141        __struct.dimension_starboard = buf.get_u8();
5142        for v in &mut __struct.callsign {
5143            let val = buf.get_u8();
5144            *v = val;
5145        }
5146        for v in &mut __struct.name {
5147            let val = buf.get_u8();
5148            *v = val;
5149        }
5150        Ok(__struct)
5151    }
5152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5153        let mut __tmp = BytesMut::new(bytes);
5154        #[allow(clippy::absurd_extreme_comparisons)]
5155        #[allow(unused_comparisons)]
5156        if __tmp.remaining() < Self::ENCODED_LEN {
5157            panic!(
5158                "buffer is too small (need {} bytes, but got {})",
5159                Self::ENCODED_LEN,
5160                __tmp.remaining(),
5161            )
5162        }
5163        __tmp.put_u32_le(self.MMSI);
5164        __tmp.put_i32_le(self.lat);
5165        __tmp.put_i32_le(self.lon);
5166        __tmp.put_u16_le(self.COG);
5167        __tmp.put_u16_le(self.heading);
5168        __tmp.put_u16_le(self.velocity);
5169        __tmp.put_u16_le(self.dimension_bow);
5170        __tmp.put_u16_le(self.dimension_stern);
5171        __tmp.put_u16_le(self.tslc);
5172        __tmp.put_u16_le(self.flags.bits());
5173        __tmp.put_i8(self.turn_rate);
5174        __tmp.put_u8(self.navigational_status as u8);
5175        __tmp.put_u8(self.mavtype as u8);
5176        __tmp.put_u8(self.dimension_port);
5177        __tmp.put_u8(self.dimension_starboard);
5178        for val in &self.callsign {
5179            __tmp.put_u8(*val);
5180        }
5181        for val in &self.name {
5182            __tmp.put_u8(*val);
5183        }
5184        if matches!(version, MavlinkVersion::V2) {
5185            let len = __tmp.len();
5186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5187        } else {
5188            __tmp.len()
5189        }
5190    }
5191}
5192#[doc = "The current system altitude."]
5193#[doc = ""]
5194#[doc = "ID: 141"]
5195#[derive(Debug, Clone, PartialEq)]
5196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5198#[cfg_attr(feature = "ts", derive(TS))]
5199#[cfg_attr(feature = "ts", ts(export))]
5200pub struct ALTITUDE_DATA {
5201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5202    pub time_usec: u64,
5203    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5204    pub altitude_monotonic: f32,
5205    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5206    pub altitude_amsl: f32,
5207    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5208    pub altitude_local: f32,
5209    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5210    pub altitude_relative: f32,
5211    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5212    pub altitude_terrain: f32,
5213    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5214    pub bottom_clearance: f32,
5215}
5216impl ALTITUDE_DATA {
5217    pub const ENCODED_LEN: usize = 32usize;
5218    pub const DEFAULT: Self = Self {
5219        time_usec: 0_u64,
5220        altitude_monotonic: 0.0_f32,
5221        altitude_amsl: 0.0_f32,
5222        altitude_local: 0.0_f32,
5223        altitude_relative: 0.0_f32,
5224        altitude_terrain: 0.0_f32,
5225        bottom_clearance: 0.0_f32,
5226    };
5227    #[cfg(feature = "arbitrary")]
5228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5229        use arbitrary::{Arbitrary, Unstructured};
5230        let mut buf = [0u8; 1024];
5231        rng.fill_bytes(&mut buf);
5232        let mut unstructured = Unstructured::new(&buf);
5233        Self::arbitrary(&mut unstructured).unwrap_or_default()
5234    }
5235}
5236impl Default for ALTITUDE_DATA {
5237    fn default() -> Self {
5238        Self::DEFAULT.clone()
5239    }
5240}
5241impl MessageData for ALTITUDE_DATA {
5242    type Message = MavMessage;
5243    const ID: u32 = 141u32;
5244    const NAME: &'static str = "ALTITUDE";
5245    const EXTRA_CRC: u8 = 47u8;
5246    const ENCODED_LEN: usize = 32usize;
5247    fn deser(
5248        _version: MavlinkVersion,
5249        __input: &[u8],
5250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5251        let avail_len = __input.len();
5252        let mut payload_buf = [0; Self::ENCODED_LEN];
5253        let mut buf = if avail_len < Self::ENCODED_LEN {
5254            payload_buf[0..avail_len].copy_from_slice(__input);
5255            Bytes::new(&payload_buf)
5256        } else {
5257            Bytes::new(__input)
5258        };
5259        let mut __struct = Self::default();
5260        __struct.time_usec = buf.get_u64_le();
5261        __struct.altitude_monotonic = buf.get_f32_le();
5262        __struct.altitude_amsl = buf.get_f32_le();
5263        __struct.altitude_local = buf.get_f32_le();
5264        __struct.altitude_relative = buf.get_f32_le();
5265        __struct.altitude_terrain = buf.get_f32_le();
5266        __struct.bottom_clearance = buf.get_f32_le();
5267        Ok(__struct)
5268    }
5269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5270        let mut __tmp = BytesMut::new(bytes);
5271        #[allow(clippy::absurd_extreme_comparisons)]
5272        #[allow(unused_comparisons)]
5273        if __tmp.remaining() < Self::ENCODED_LEN {
5274            panic!(
5275                "buffer is too small (need {} bytes, but got {})",
5276                Self::ENCODED_LEN,
5277                __tmp.remaining(),
5278            )
5279        }
5280        __tmp.put_u64_le(self.time_usec);
5281        __tmp.put_f32_le(self.altitude_monotonic);
5282        __tmp.put_f32_le(self.altitude_amsl);
5283        __tmp.put_f32_le(self.altitude_local);
5284        __tmp.put_f32_le(self.altitude_relative);
5285        __tmp.put_f32_le(self.altitude_terrain);
5286        __tmp.put_f32_le(self.bottom_clearance);
5287        if matches!(version, MavlinkVersion::V2) {
5288            let len = __tmp.len();
5289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5290        } else {
5291            __tmp.len()
5292        }
5293    }
5294}
5295#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5296#[doc = ""]
5297#[doc = "ID: 30"]
5298#[derive(Debug, Clone, PartialEq)]
5299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5301#[cfg_attr(feature = "ts", derive(TS))]
5302#[cfg_attr(feature = "ts", ts(export))]
5303pub struct ATTITUDE_DATA {
5304    #[doc = "Timestamp (time since system boot)."]
5305    pub time_boot_ms: u32,
5306    #[doc = "Roll angle (-pi..+pi)"]
5307    pub roll: f32,
5308    #[doc = "Pitch angle (-pi..+pi)"]
5309    pub pitch: f32,
5310    #[doc = "Yaw angle (-pi..+pi)"]
5311    pub yaw: f32,
5312    #[doc = "Roll angular speed"]
5313    pub rollspeed: f32,
5314    #[doc = "Pitch angular speed"]
5315    pub pitchspeed: f32,
5316    #[doc = "Yaw angular speed"]
5317    pub yawspeed: f32,
5318}
5319impl ATTITUDE_DATA {
5320    pub const ENCODED_LEN: usize = 28usize;
5321    pub const DEFAULT: Self = Self {
5322        time_boot_ms: 0_u32,
5323        roll: 0.0_f32,
5324        pitch: 0.0_f32,
5325        yaw: 0.0_f32,
5326        rollspeed: 0.0_f32,
5327        pitchspeed: 0.0_f32,
5328        yawspeed: 0.0_f32,
5329    };
5330    #[cfg(feature = "arbitrary")]
5331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5332        use arbitrary::{Arbitrary, Unstructured};
5333        let mut buf = [0u8; 1024];
5334        rng.fill_bytes(&mut buf);
5335        let mut unstructured = Unstructured::new(&buf);
5336        Self::arbitrary(&mut unstructured).unwrap_or_default()
5337    }
5338}
5339impl Default for ATTITUDE_DATA {
5340    fn default() -> Self {
5341        Self::DEFAULT.clone()
5342    }
5343}
5344impl MessageData for ATTITUDE_DATA {
5345    type Message = MavMessage;
5346    const ID: u32 = 30u32;
5347    const NAME: &'static str = "ATTITUDE";
5348    const EXTRA_CRC: u8 = 39u8;
5349    const ENCODED_LEN: usize = 28usize;
5350    fn deser(
5351        _version: MavlinkVersion,
5352        __input: &[u8],
5353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5354        let avail_len = __input.len();
5355        let mut payload_buf = [0; Self::ENCODED_LEN];
5356        let mut buf = if avail_len < Self::ENCODED_LEN {
5357            payload_buf[0..avail_len].copy_from_slice(__input);
5358            Bytes::new(&payload_buf)
5359        } else {
5360            Bytes::new(__input)
5361        };
5362        let mut __struct = Self::default();
5363        __struct.time_boot_ms = buf.get_u32_le();
5364        __struct.roll = buf.get_f32_le();
5365        __struct.pitch = buf.get_f32_le();
5366        __struct.yaw = buf.get_f32_le();
5367        __struct.rollspeed = buf.get_f32_le();
5368        __struct.pitchspeed = buf.get_f32_le();
5369        __struct.yawspeed = buf.get_f32_le();
5370        Ok(__struct)
5371    }
5372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5373        let mut __tmp = BytesMut::new(bytes);
5374        #[allow(clippy::absurd_extreme_comparisons)]
5375        #[allow(unused_comparisons)]
5376        if __tmp.remaining() < Self::ENCODED_LEN {
5377            panic!(
5378                "buffer is too small (need {} bytes, but got {})",
5379                Self::ENCODED_LEN,
5380                __tmp.remaining(),
5381            )
5382        }
5383        __tmp.put_u32_le(self.time_boot_ms);
5384        __tmp.put_f32_le(self.roll);
5385        __tmp.put_f32_le(self.pitch);
5386        __tmp.put_f32_le(self.yaw);
5387        __tmp.put_f32_le(self.rollspeed);
5388        __tmp.put_f32_le(self.pitchspeed);
5389        __tmp.put_f32_le(self.yawspeed);
5390        if matches!(version, MavlinkVersion::V2) {
5391            let len = __tmp.len();
5392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5393        } else {
5394            __tmp.len()
5395        }
5396    }
5397}
5398#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5399#[doc = ""]
5400#[doc = "ID: 31"]
5401#[derive(Debug, Clone, PartialEq)]
5402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5404#[cfg_attr(feature = "ts", derive(TS))]
5405#[cfg_attr(feature = "ts", ts(export))]
5406pub struct ATTITUDE_QUATERNION_DATA {
5407    #[doc = "Timestamp (time since system boot)."]
5408    pub time_boot_ms: u32,
5409    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5410    pub q1: f32,
5411    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5412    pub q2: f32,
5413    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5414    pub q3: f32,
5415    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5416    pub q4: f32,
5417    #[doc = "Roll angular speed"]
5418    pub rollspeed: f32,
5419    #[doc = "Pitch angular speed"]
5420    pub pitchspeed: f32,
5421    #[doc = "Yaw angular speed"]
5422    pub yawspeed: f32,
5423    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5427    pub repr_offset_q: [f32; 4],
5428}
5429impl ATTITUDE_QUATERNION_DATA {
5430    pub const ENCODED_LEN: usize = 48usize;
5431    pub const DEFAULT: Self = Self {
5432        time_boot_ms: 0_u32,
5433        q1: 0.0_f32,
5434        q2: 0.0_f32,
5435        q3: 0.0_f32,
5436        q4: 0.0_f32,
5437        rollspeed: 0.0_f32,
5438        pitchspeed: 0.0_f32,
5439        yawspeed: 0.0_f32,
5440        repr_offset_q: [0.0_f32; 4usize],
5441    };
5442    #[cfg(feature = "arbitrary")]
5443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5444        use arbitrary::{Arbitrary, Unstructured};
5445        let mut buf = [0u8; 1024];
5446        rng.fill_bytes(&mut buf);
5447        let mut unstructured = Unstructured::new(&buf);
5448        Self::arbitrary(&mut unstructured).unwrap_or_default()
5449    }
5450}
5451impl Default for ATTITUDE_QUATERNION_DATA {
5452    fn default() -> Self {
5453        Self::DEFAULT.clone()
5454    }
5455}
5456impl MessageData for ATTITUDE_QUATERNION_DATA {
5457    type Message = MavMessage;
5458    const ID: u32 = 31u32;
5459    const NAME: &'static str = "ATTITUDE_QUATERNION";
5460    const EXTRA_CRC: u8 = 246u8;
5461    const ENCODED_LEN: usize = 48usize;
5462    fn deser(
5463        _version: MavlinkVersion,
5464        __input: &[u8],
5465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5466        let avail_len = __input.len();
5467        let mut payload_buf = [0; Self::ENCODED_LEN];
5468        let mut buf = if avail_len < Self::ENCODED_LEN {
5469            payload_buf[0..avail_len].copy_from_slice(__input);
5470            Bytes::new(&payload_buf)
5471        } else {
5472            Bytes::new(__input)
5473        };
5474        let mut __struct = Self::default();
5475        __struct.time_boot_ms = buf.get_u32_le();
5476        __struct.q1 = buf.get_f32_le();
5477        __struct.q2 = buf.get_f32_le();
5478        __struct.q3 = buf.get_f32_le();
5479        __struct.q4 = buf.get_f32_le();
5480        __struct.rollspeed = buf.get_f32_le();
5481        __struct.pitchspeed = buf.get_f32_le();
5482        __struct.yawspeed = buf.get_f32_le();
5483        for v in &mut __struct.repr_offset_q {
5484            let val = buf.get_f32_le();
5485            *v = val;
5486        }
5487        Ok(__struct)
5488    }
5489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5490        let mut __tmp = BytesMut::new(bytes);
5491        #[allow(clippy::absurd_extreme_comparisons)]
5492        #[allow(unused_comparisons)]
5493        if __tmp.remaining() < Self::ENCODED_LEN {
5494            panic!(
5495                "buffer is too small (need {} bytes, but got {})",
5496                Self::ENCODED_LEN,
5497                __tmp.remaining(),
5498            )
5499        }
5500        __tmp.put_u32_le(self.time_boot_ms);
5501        __tmp.put_f32_le(self.q1);
5502        __tmp.put_f32_le(self.q2);
5503        __tmp.put_f32_le(self.q3);
5504        __tmp.put_f32_le(self.q4);
5505        __tmp.put_f32_le(self.rollspeed);
5506        __tmp.put_f32_le(self.pitchspeed);
5507        __tmp.put_f32_le(self.yawspeed);
5508        if matches!(version, MavlinkVersion::V2) {
5509            for val in &self.repr_offset_q {
5510                __tmp.put_f32_le(*val);
5511            }
5512            let len = __tmp.len();
5513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5514        } else {
5515            __tmp.len()
5516        }
5517    }
5518}
5519#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5520#[doc = ""]
5521#[doc = "ID: 61"]
5522#[derive(Debug, Clone, PartialEq)]
5523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5525#[cfg_attr(feature = "ts", derive(TS))]
5526#[cfg_attr(feature = "ts", ts(export))]
5527pub struct ATTITUDE_QUATERNION_COV_DATA {
5528    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5529    pub time_usec: u64,
5530    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5533    pub q: [f32; 4],
5534    #[doc = "Roll angular speed"]
5535    pub rollspeed: f32,
5536    #[doc = "Pitch angular speed"]
5537    pub pitchspeed: f32,
5538    #[doc = "Yaw angular speed"]
5539    pub yawspeed: f32,
5540    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5543    pub covariance: [f32; 9],
5544}
5545impl ATTITUDE_QUATERNION_COV_DATA {
5546    pub const ENCODED_LEN: usize = 72usize;
5547    pub const DEFAULT: Self = Self {
5548        time_usec: 0_u64,
5549        q: [0.0_f32; 4usize],
5550        rollspeed: 0.0_f32,
5551        pitchspeed: 0.0_f32,
5552        yawspeed: 0.0_f32,
5553        covariance: [0.0_f32; 9usize],
5554    };
5555    #[cfg(feature = "arbitrary")]
5556    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5557        use arbitrary::{Arbitrary, Unstructured};
5558        let mut buf = [0u8; 1024];
5559        rng.fill_bytes(&mut buf);
5560        let mut unstructured = Unstructured::new(&buf);
5561        Self::arbitrary(&mut unstructured).unwrap_or_default()
5562    }
5563}
5564impl Default for ATTITUDE_QUATERNION_COV_DATA {
5565    fn default() -> Self {
5566        Self::DEFAULT.clone()
5567    }
5568}
5569impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5570    type Message = MavMessage;
5571    const ID: u32 = 61u32;
5572    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5573    const EXTRA_CRC: u8 = 167u8;
5574    const ENCODED_LEN: usize = 72usize;
5575    fn deser(
5576        _version: MavlinkVersion,
5577        __input: &[u8],
5578    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5579        let avail_len = __input.len();
5580        let mut payload_buf = [0; Self::ENCODED_LEN];
5581        let mut buf = if avail_len < Self::ENCODED_LEN {
5582            payload_buf[0..avail_len].copy_from_slice(__input);
5583            Bytes::new(&payload_buf)
5584        } else {
5585            Bytes::new(__input)
5586        };
5587        let mut __struct = Self::default();
5588        __struct.time_usec = buf.get_u64_le();
5589        for v in &mut __struct.q {
5590            let val = buf.get_f32_le();
5591            *v = val;
5592        }
5593        __struct.rollspeed = buf.get_f32_le();
5594        __struct.pitchspeed = buf.get_f32_le();
5595        __struct.yawspeed = buf.get_f32_le();
5596        for v in &mut __struct.covariance {
5597            let val = buf.get_f32_le();
5598            *v = val;
5599        }
5600        Ok(__struct)
5601    }
5602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5603        let mut __tmp = BytesMut::new(bytes);
5604        #[allow(clippy::absurd_extreme_comparisons)]
5605        #[allow(unused_comparisons)]
5606        if __tmp.remaining() < Self::ENCODED_LEN {
5607            panic!(
5608                "buffer is too small (need {} bytes, but got {})",
5609                Self::ENCODED_LEN,
5610                __tmp.remaining(),
5611            )
5612        }
5613        __tmp.put_u64_le(self.time_usec);
5614        for val in &self.q {
5615            __tmp.put_f32_le(*val);
5616        }
5617        __tmp.put_f32_le(self.rollspeed);
5618        __tmp.put_f32_le(self.pitchspeed);
5619        __tmp.put_f32_le(self.yawspeed);
5620        for val in &self.covariance {
5621            __tmp.put_f32_le(*val);
5622        }
5623        if matches!(version, MavlinkVersion::V2) {
5624            let len = __tmp.len();
5625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5626        } else {
5627            __tmp.len()
5628        }
5629    }
5630}
5631#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5632#[doc = ""]
5633#[doc = "ID: 83"]
5634#[derive(Debug, Clone, PartialEq)]
5635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5637#[cfg_attr(feature = "ts", derive(TS))]
5638#[cfg_attr(feature = "ts", ts(export))]
5639pub struct ATTITUDE_TARGET_DATA {
5640    #[doc = "Timestamp (time since system boot)."]
5641    pub time_boot_ms: u32,
5642    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5645    pub q: [f32; 4],
5646    #[doc = "Body roll rate"]
5647    pub body_roll_rate: f32,
5648    #[doc = "Body pitch rate"]
5649    pub body_pitch_rate: f32,
5650    #[doc = "Body yaw rate"]
5651    pub body_yaw_rate: f32,
5652    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5653    pub thrust: f32,
5654    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5655    pub type_mask: AttitudeTargetTypemask,
5656}
5657impl ATTITUDE_TARGET_DATA {
5658    pub const ENCODED_LEN: usize = 37usize;
5659    pub const DEFAULT: Self = Self {
5660        time_boot_ms: 0_u32,
5661        q: [0.0_f32; 4usize],
5662        body_roll_rate: 0.0_f32,
5663        body_pitch_rate: 0.0_f32,
5664        body_yaw_rate: 0.0_f32,
5665        thrust: 0.0_f32,
5666        type_mask: AttitudeTargetTypemask::DEFAULT,
5667    };
5668    #[cfg(feature = "arbitrary")]
5669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5670        use arbitrary::{Arbitrary, Unstructured};
5671        let mut buf = [0u8; 1024];
5672        rng.fill_bytes(&mut buf);
5673        let mut unstructured = Unstructured::new(&buf);
5674        Self::arbitrary(&mut unstructured).unwrap_or_default()
5675    }
5676}
5677impl Default for ATTITUDE_TARGET_DATA {
5678    fn default() -> Self {
5679        Self::DEFAULT.clone()
5680    }
5681}
5682impl MessageData for ATTITUDE_TARGET_DATA {
5683    type Message = MavMessage;
5684    const ID: u32 = 83u32;
5685    const NAME: &'static str = "ATTITUDE_TARGET";
5686    const EXTRA_CRC: u8 = 22u8;
5687    const ENCODED_LEN: usize = 37usize;
5688    fn deser(
5689        _version: MavlinkVersion,
5690        __input: &[u8],
5691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5692        let avail_len = __input.len();
5693        let mut payload_buf = [0; Self::ENCODED_LEN];
5694        let mut buf = if avail_len < Self::ENCODED_LEN {
5695            payload_buf[0..avail_len].copy_from_slice(__input);
5696            Bytes::new(&payload_buf)
5697        } else {
5698            Bytes::new(__input)
5699        };
5700        let mut __struct = Self::default();
5701        __struct.time_boot_ms = buf.get_u32_le();
5702        for v in &mut __struct.q {
5703            let val = buf.get_f32_le();
5704            *v = val;
5705        }
5706        __struct.body_roll_rate = buf.get_f32_le();
5707        __struct.body_pitch_rate = buf.get_f32_le();
5708        __struct.body_yaw_rate = buf.get_f32_le();
5709        __struct.thrust = buf.get_f32_le();
5710        let tmp = buf.get_u8();
5711        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5712            tmp & AttitudeTargetTypemask::all().bits(),
5713        )
5714        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5715            flag_type: "AttitudeTargetTypemask",
5716            value: tmp as u32,
5717        })?;
5718        Ok(__struct)
5719    }
5720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5721        let mut __tmp = BytesMut::new(bytes);
5722        #[allow(clippy::absurd_extreme_comparisons)]
5723        #[allow(unused_comparisons)]
5724        if __tmp.remaining() < Self::ENCODED_LEN {
5725            panic!(
5726                "buffer is too small (need {} bytes, but got {})",
5727                Self::ENCODED_LEN,
5728                __tmp.remaining(),
5729            )
5730        }
5731        __tmp.put_u32_le(self.time_boot_ms);
5732        for val in &self.q {
5733            __tmp.put_f32_le(*val);
5734        }
5735        __tmp.put_f32_le(self.body_roll_rate);
5736        __tmp.put_f32_le(self.body_pitch_rate);
5737        __tmp.put_f32_le(self.body_yaw_rate);
5738        __tmp.put_f32_le(self.thrust);
5739        __tmp.put_u8(self.type_mask.bits());
5740        if matches!(version, MavlinkVersion::V2) {
5741            let len = __tmp.len();
5742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5743        } else {
5744            __tmp.len()
5745        }
5746    }
5747}
5748#[doc = "Motion capture attitude and position."]
5749#[doc = ""]
5750#[doc = "ID: 138"]
5751#[derive(Debug, Clone, PartialEq)]
5752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5754#[cfg_attr(feature = "ts", derive(TS))]
5755#[cfg_attr(feature = "ts", ts(export))]
5756pub struct ATT_POS_MOCAP_DATA {
5757    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5758    pub time_usec: u64,
5759    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5760    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5761    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5762    pub q: [f32; 4],
5763    #[doc = "X position (NED)"]
5764    pub x: f32,
5765    #[doc = "Y position (NED)"]
5766    pub y: f32,
5767    #[doc = "Z position (NED)"]
5768    pub z: f32,
5769    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5770    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5771    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5772    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5773    pub covariance: [f32; 21],
5774}
5775impl ATT_POS_MOCAP_DATA {
5776    pub const ENCODED_LEN: usize = 120usize;
5777    pub const DEFAULT: Self = Self {
5778        time_usec: 0_u64,
5779        q: [0.0_f32; 4usize],
5780        x: 0.0_f32,
5781        y: 0.0_f32,
5782        z: 0.0_f32,
5783        covariance: [0.0_f32; 21usize],
5784    };
5785    #[cfg(feature = "arbitrary")]
5786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5787        use arbitrary::{Arbitrary, Unstructured};
5788        let mut buf = [0u8; 1024];
5789        rng.fill_bytes(&mut buf);
5790        let mut unstructured = Unstructured::new(&buf);
5791        Self::arbitrary(&mut unstructured).unwrap_or_default()
5792    }
5793}
5794impl Default for ATT_POS_MOCAP_DATA {
5795    fn default() -> Self {
5796        Self::DEFAULT.clone()
5797    }
5798}
5799impl MessageData for ATT_POS_MOCAP_DATA {
5800    type Message = MavMessage;
5801    const ID: u32 = 138u32;
5802    const NAME: &'static str = "ATT_POS_MOCAP";
5803    const EXTRA_CRC: u8 = 109u8;
5804    const ENCODED_LEN: usize = 120usize;
5805    fn deser(
5806        _version: MavlinkVersion,
5807        __input: &[u8],
5808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5809        let avail_len = __input.len();
5810        let mut payload_buf = [0; Self::ENCODED_LEN];
5811        let mut buf = if avail_len < Self::ENCODED_LEN {
5812            payload_buf[0..avail_len].copy_from_slice(__input);
5813            Bytes::new(&payload_buf)
5814        } else {
5815            Bytes::new(__input)
5816        };
5817        let mut __struct = Self::default();
5818        __struct.time_usec = buf.get_u64_le();
5819        for v in &mut __struct.q {
5820            let val = buf.get_f32_le();
5821            *v = val;
5822        }
5823        __struct.x = buf.get_f32_le();
5824        __struct.y = buf.get_f32_le();
5825        __struct.z = buf.get_f32_le();
5826        for v in &mut __struct.covariance {
5827            let val = buf.get_f32_le();
5828            *v = val;
5829        }
5830        Ok(__struct)
5831    }
5832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5833        let mut __tmp = BytesMut::new(bytes);
5834        #[allow(clippy::absurd_extreme_comparisons)]
5835        #[allow(unused_comparisons)]
5836        if __tmp.remaining() < Self::ENCODED_LEN {
5837            panic!(
5838                "buffer is too small (need {} bytes, but got {})",
5839                Self::ENCODED_LEN,
5840                __tmp.remaining(),
5841            )
5842        }
5843        __tmp.put_u64_le(self.time_usec);
5844        for val in &self.q {
5845            __tmp.put_f32_le(*val);
5846        }
5847        __tmp.put_f32_le(self.x);
5848        __tmp.put_f32_le(self.y);
5849        __tmp.put_f32_le(self.z);
5850        if matches!(version, MavlinkVersion::V2) {
5851            for val in &self.covariance {
5852                __tmp.put_f32_le(*val);
5853            }
5854            let len = __tmp.len();
5855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5856        } else {
5857            __tmp.len()
5858        }
5859    }
5860}
5861#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5862#[doc = ""]
5863#[doc = "ID: 7"]
5864#[derive(Debug, Clone, PartialEq)]
5865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5867#[cfg_attr(feature = "ts", derive(TS))]
5868#[cfg_attr(feature = "ts", ts(export))]
5869pub struct AUTH_KEY_DATA {
5870    #[doc = "key"]
5871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5872    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5873    pub key: [u8; 32],
5874}
5875impl AUTH_KEY_DATA {
5876    pub const ENCODED_LEN: usize = 32usize;
5877    pub const DEFAULT: Self = Self {
5878        key: [0_u8; 32usize],
5879    };
5880    #[cfg(feature = "arbitrary")]
5881    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5882        use arbitrary::{Arbitrary, Unstructured};
5883        let mut buf = [0u8; 1024];
5884        rng.fill_bytes(&mut buf);
5885        let mut unstructured = Unstructured::new(&buf);
5886        Self::arbitrary(&mut unstructured).unwrap_or_default()
5887    }
5888}
5889impl Default for AUTH_KEY_DATA {
5890    fn default() -> Self {
5891        Self::DEFAULT.clone()
5892    }
5893}
5894impl MessageData for AUTH_KEY_DATA {
5895    type Message = MavMessage;
5896    const ID: u32 = 7u32;
5897    const NAME: &'static str = "AUTH_KEY";
5898    const EXTRA_CRC: u8 = 119u8;
5899    const ENCODED_LEN: usize = 32usize;
5900    fn deser(
5901        _version: MavlinkVersion,
5902        __input: &[u8],
5903    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5904        let avail_len = __input.len();
5905        let mut payload_buf = [0; Self::ENCODED_LEN];
5906        let mut buf = if avail_len < Self::ENCODED_LEN {
5907            payload_buf[0..avail_len].copy_from_slice(__input);
5908            Bytes::new(&payload_buf)
5909        } else {
5910            Bytes::new(__input)
5911        };
5912        let mut __struct = Self::default();
5913        for v in &mut __struct.key {
5914            let val = buf.get_u8();
5915            *v = val;
5916        }
5917        Ok(__struct)
5918    }
5919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5920        let mut __tmp = BytesMut::new(bytes);
5921        #[allow(clippy::absurd_extreme_comparisons)]
5922        #[allow(unused_comparisons)]
5923        if __tmp.remaining() < Self::ENCODED_LEN {
5924            panic!(
5925                "buffer is too small (need {} bytes, but got {})",
5926                Self::ENCODED_LEN,
5927                __tmp.remaining(),
5928            )
5929        }
5930        for val in &self.key {
5931            __tmp.put_u8(*val);
5932        }
5933        if matches!(version, MavlinkVersion::V2) {
5934            let len = __tmp.len();
5935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5936        } else {
5937            __tmp.len()
5938        }
5939    }
5940}
5941#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5942#[doc = ""]
5943#[doc = "ID: 286"]
5944#[derive(Debug, Clone, PartialEq)]
5945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5947#[cfg_attr(feature = "ts", derive(TS))]
5948#[cfg_attr(feature = "ts", ts(export))]
5949pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5950    #[doc = "Timestamp (time since system boot)."]
5951    pub time_boot_us: u64,
5952    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5955    pub q: [f32; 4],
5956    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5957    pub q_estimated_delay_us: u32,
5958    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5959    pub vx: f32,
5960    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5961    pub vy: f32,
5962    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5963    pub vz: f32,
5964    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5965    pub v_estimated_delay_us: u32,
5966    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5967    pub feed_forward_angular_velocity_z: f32,
5968    #[doc = "Bitmap indicating which estimator outputs are valid."]
5969    pub estimator_status: EstimatorStatusFlags,
5970    #[doc = "System ID"]
5971    pub target_system: u8,
5972    #[doc = "Component ID"]
5973    pub target_component: u8,
5974    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5975    pub landed_state: MavLandedState,
5976    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5977    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5978    pub angular_velocity_z: f32,
5979}
5980impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5981    pub const ENCODED_LEN: usize = 57usize;
5982    pub const DEFAULT: Self = Self {
5983        time_boot_us: 0_u64,
5984        q: [0.0_f32; 4usize],
5985        q_estimated_delay_us: 0_u32,
5986        vx: 0.0_f32,
5987        vy: 0.0_f32,
5988        vz: 0.0_f32,
5989        v_estimated_delay_us: 0_u32,
5990        feed_forward_angular_velocity_z: 0.0_f32,
5991        estimator_status: EstimatorStatusFlags::DEFAULT,
5992        target_system: 0_u8,
5993        target_component: 0_u8,
5994        landed_state: MavLandedState::DEFAULT,
5995        angular_velocity_z: 0.0_f32,
5996    };
5997    #[cfg(feature = "arbitrary")]
5998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5999        use arbitrary::{Arbitrary, Unstructured};
6000        let mut buf = [0u8; 1024];
6001        rng.fill_bytes(&mut buf);
6002        let mut unstructured = Unstructured::new(&buf);
6003        Self::arbitrary(&mut unstructured).unwrap_or_default()
6004    }
6005}
6006impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6007    fn default() -> Self {
6008        Self::DEFAULT.clone()
6009    }
6010}
6011impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6012    type Message = MavMessage;
6013    const ID: u32 = 286u32;
6014    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6015    const EXTRA_CRC: u8 = 210u8;
6016    const ENCODED_LEN: usize = 57usize;
6017    fn deser(
6018        _version: MavlinkVersion,
6019        __input: &[u8],
6020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6021        let avail_len = __input.len();
6022        let mut payload_buf = [0; Self::ENCODED_LEN];
6023        let mut buf = if avail_len < Self::ENCODED_LEN {
6024            payload_buf[0..avail_len].copy_from_slice(__input);
6025            Bytes::new(&payload_buf)
6026        } else {
6027            Bytes::new(__input)
6028        };
6029        let mut __struct = Self::default();
6030        __struct.time_boot_us = buf.get_u64_le();
6031        for v in &mut __struct.q {
6032            let val = buf.get_f32_le();
6033            *v = val;
6034        }
6035        __struct.q_estimated_delay_us = buf.get_u32_le();
6036        __struct.vx = buf.get_f32_le();
6037        __struct.vy = buf.get_f32_le();
6038        __struct.vz = buf.get_f32_le();
6039        __struct.v_estimated_delay_us = buf.get_u32_le();
6040        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6041        let tmp = buf.get_u16_le();
6042        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6043            tmp & EstimatorStatusFlags::all().bits(),
6044        )
6045        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6046            flag_type: "EstimatorStatusFlags",
6047            value: tmp as u32,
6048        })?;
6049        __struct.target_system = buf.get_u8();
6050        __struct.target_component = buf.get_u8();
6051        let tmp = buf.get_u8();
6052        __struct.landed_state =
6053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6054                enum_type: "MavLandedState",
6055                value: tmp as u32,
6056            })?;
6057        __struct.angular_velocity_z = buf.get_f32_le();
6058        Ok(__struct)
6059    }
6060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6061        let mut __tmp = BytesMut::new(bytes);
6062        #[allow(clippy::absurd_extreme_comparisons)]
6063        #[allow(unused_comparisons)]
6064        if __tmp.remaining() < Self::ENCODED_LEN {
6065            panic!(
6066                "buffer is too small (need {} bytes, but got {})",
6067                Self::ENCODED_LEN,
6068                __tmp.remaining(),
6069            )
6070        }
6071        __tmp.put_u64_le(self.time_boot_us);
6072        for val in &self.q {
6073            __tmp.put_f32_le(*val);
6074        }
6075        __tmp.put_u32_le(self.q_estimated_delay_us);
6076        __tmp.put_f32_le(self.vx);
6077        __tmp.put_f32_le(self.vy);
6078        __tmp.put_f32_le(self.vz);
6079        __tmp.put_u32_le(self.v_estimated_delay_us);
6080        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6081        __tmp.put_u16_le(self.estimator_status.bits());
6082        __tmp.put_u8(self.target_system);
6083        __tmp.put_u8(self.target_component);
6084        __tmp.put_u8(self.landed_state as u8);
6085        if matches!(version, MavlinkVersion::V2) {
6086            __tmp.put_f32_le(self.angular_velocity_z);
6087            let len = __tmp.len();
6088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6089        } else {
6090            __tmp.len()
6091        }
6092    }
6093}
6094#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6095#[doc = ""]
6096#[doc = "ID: 148"]
6097#[derive(Debug, Clone, PartialEq)]
6098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6100#[cfg_attr(feature = "ts", derive(TS))]
6101#[cfg_attr(feature = "ts", ts(export))]
6102pub struct AUTOPILOT_VERSION_DATA {
6103    #[doc = "Bitmap of capabilities"]
6104    pub capabilities: MavProtocolCapability,
6105    #[doc = "UID if provided by hardware (see uid2)"]
6106    pub uid: u64,
6107    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6108    pub flight_sw_version: u32,
6109    #[doc = "Middleware version number"]
6110    pub middleware_sw_version: u32,
6111    #[doc = "Operating system version number"]
6112    pub os_sw_version: u32,
6113    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6114    pub board_version: u32,
6115    #[doc = "ID of the board vendor"]
6116    pub vendor_id: u16,
6117    #[doc = "ID of the product"]
6118    pub product_id: u16,
6119    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6121    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6122    pub flight_custom_version: [u8; 8],
6123    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6125    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6126    pub middleware_custom_version: [u8; 8],
6127    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6128    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6129    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6130    pub os_custom_version: [u8; 8],
6131    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6134    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6135    pub uid2: [u8; 18],
6136}
6137impl AUTOPILOT_VERSION_DATA {
6138    pub const ENCODED_LEN: usize = 78usize;
6139    pub const DEFAULT: Self = Self {
6140        capabilities: MavProtocolCapability::DEFAULT,
6141        uid: 0_u64,
6142        flight_sw_version: 0_u32,
6143        middleware_sw_version: 0_u32,
6144        os_sw_version: 0_u32,
6145        board_version: 0_u32,
6146        vendor_id: 0_u16,
6147        product_id: 0_u16,
6148        flight_custom_version: [0_u8; 8usize],
6149        middleware_custom_version: [0_u8; 8usize],
6150        os_custom_version: [0_u8; 8usize],
6151        uid2: [0_u8; 18usize],
6152    };
6153    #[cfg(feature = "arbitrary")]
6154    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6155        use arbitrary::{Arbitrary, Unstructured};
6156        let mut buf = [0u8; 1024];
6157        rng.fill_bytes(&mut buf);
6158        let mut unstructured = Unstructured::new(&buf);
6159        Self::arbitrary(&mut unstructured).unwrap_or_default()
6160    }
6161}
6162impl Default for AUTOPILOT_VERSION_DATA {
6163    fn default() -> Self {
6164        Self::DEFAULT.clone()
6165    }
6166}
6167impl MessageData for AUTOPILOT_VERSION_DATA {
6168    type Message = MavMessage;
6169    const ID: u32 = 148u32;
6170    const NAME: &'static str = "AUTOPILOT_VERSION";
6171    const EXTRA_CRC: u8 = 178u8;
6172    const ENCODED_LEN: usize = 78usize;
6173    fn deser(
6174        _version: MavlinkVersion,
6175        __input: &[u8],
6176    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6177        let avail_len = __input.len();
6178        let mut payload_buf = [0; Self::ENCODED_LEN];
6179        let mut buf = if avail_len < Self::ENCODED_LEN {
6180            payload_buf[0..avail_len].copy_from_slice(__input);
6181            Bytes::new(&payload_buf)
6182        } else {
6183            Bytes::new(__input)
6184        };
6185        let mut __struct = Self::default();
6186        let tmp = buf.get_u64_le();
6187        __struct.capabilities = MavProtocolCapability::from_bits(
6188            tmp & MavProtocolCapability::all().bits(),
6189        )
6190        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6191            flag_type: "MavProtocolCapability",
6192            value: tmp as u32,
6193        })?;
6194        __struct.uid = buf.get_u64_le();
6195        __struct.flight_sw_version = buf.get_u32_le();
6196        __struct.middleware_sw_version = buf.get_u32_le();
6197        __struct.os_sw_version = buf.get_u32_le();
6198        __struct.board_version = buf.get_u32_le();
6199        __struct.vendor_id = buf.get_u16_le();
6200        __struct.product_id = buf.get_u16_le();
6201        for v in &mut __struct.flight_custom_version {
6202            let val = buf.get_u8();
6203            *v = val;
6204        }
6205        for v in &mut __struct.middleware_custom_version {
6206            let val = buf.get_u8();
6207            *v = val;
6208        }
6209        for v in &mut __struct.os_custom_version {
6210            let val = buf.get_u8();
6211            *v = val;
6212        }
6213        for v in &mut __struct.uid2 {
6214            let val = buf.get_u8();
6215            *v = val;
6216        }
6217        Ok(__struct)
6218    }
6219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6220        let mut __tmp = BytesMut::new(bytes);
6221        #[allow(clippy::absurd_extreme_comparisons)]
6222        #[allow(unused_comparisons)]
6223        if __tmp.remaining() < Self::ENCODED_LEN {
6224            panic!(
6225                "buffer is too small (need {} bytes, but got {})",
6226                Self::ENCODED_LEN,
6227                __tmp.remaining(),
6228            )
6229        }
6230        __tmp.put_u64_le(self.capabilities.bits());
6231        __tmp.put_u64_le(self.uid);
6232        __tmp.put_u32_le(self.flight_sw_version);
6233        __tmp.put_u32_le(self.middleware_sw_version);
6234        __tmp.put_u32_le(self.os_sw_version);
6235        __tmp.put_u32_le(self.board_version);
6236        __tmp.put_u16_le(self.vendor_id);
6237        __tmp.put_u16_le(self.product_id);
6238        for val in &self.flight_custom_version {
6239            __tmp.put_u8(*val);
6240        }
6241        for val in &self.middleware_custom_version {
6242            __tmp.put_u8(*val);
6243        }
6244        for val in &self.os_custom_version {
6245            __tmp.put_u8(*val);
6246        }
6247        if matches!(version, MavlinkVersion::V2) {
6248            for val in &self.uid2 {
6249                __tmp.put_u8(*val);
6250            }
6251            let len = __tmp.len();
6252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6253        } else {
6254            __tmp.len()
6255        }
6256    }
6257}
6258#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6259#[doc = ""]
6260#[doc = "ID: 435"]
6261#[derive(Debug, Clone, PartialEq)]
6262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6264#[cfg_attr(feature = "ts", derive(TS))]
6265#[cfg_attr(feature = "ts", ts(export))]
6266pub struct AVAILABLE_MODES_DATA {
6267    #[doc = "A bitfield for use for autopilot-specific flags"]
6268    pub custom_mode: u32,
6269    #[doc = "Mode properties."]
6270    pub properties: MavModeProperty,
6271    #[doc = "The total number of available modes for the current vehicle type."]
6272    pub number_modes: u8,
6273    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6274    pub mode_index: u8,
6275    #[doc = "Standard mode."]
6276    pub standard_mode: MavStandardMode,
6277    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6280    pub mode_name: [u8; 35],
6281}
6282impl AVAILABLE_MODES_DATA {
6283    pub const ENCODED_LEN: usize = 46usize;
6284    pub const DEFAULT: Self = Self {
6285        custom_mode: 0_u32,
6286        properties: MavModeProperty::DEFAULT,
6287        number_modes: 0_u8,
6288        mode_index: 0_u8,
6289        standard_mode: MavStandardMode::DEFAULT,
6290        mode_name: [0_u8; 35usize],
6291    };
6292    #[cfg(feature = "arbitrary")]
6293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6294        use arbitrary::{Arbitrary, Unstructured};
6295        let mut buf = [0u8; 1024];
6296        rng.fill_bytes(&mut buf);
6297        let mut unstructured = Unstructured::new(&buf);
6298        Self::arbitrary(&mut unstructured).unwrap_or_default()
6299    }
6300}
6301impl Default for AVAILABLE_MODES_DATA {
6302    fn default() -> Self {
6303        Self::DEFAULT.clone()
6304    }
6305}
6306impl MessageData for AVAILABLE_MODES_DATA {
6307    type Message = MavMessage;
6308    const ID: u32 = 435u32;
6309    const NAME: &'static str = "AVAILABLE_MODES";
6310    const EXTRA_CRC: u8 = 134u8;
6311    const ENCODED_LEN: usize = 46usize;
6312    fn deser(
6313        _version: MavlinkVersion,
6314        __input: &[u8],
6315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6316        let avail_len = __input.len();
6317        let mut payload_buf = [0; Self::ENCODED_LEN];
6318        let mut buf = if avail_len < Self::ENCODED_LEN {
6319            payload_buf[0..avail_len].copy_from_slice(__input);
6320            Bytes::new(&payload_buf)
6321        } else {
6322            Bytes::new(__input)
6323        };
6324        let mut __struct = Self::default();
6325        __struct.custom_mode = buf.get_u32_le();
6326        let tmp = buf.get_u32_le();
6327        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6328            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6329                flag_type: "MavModeProperty",
6330                value: tmp as u32,
6331            })?;
6332        __struct.number_modes = buf.get_u8();
6333        __struct.mode_index = buf.get_u8();
6334        let tmp = buf.get_u8();
6335        __struct.standard_mode =
6336            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6337                enum_type: "MavStandardMode",
6338                value: tmp as u32,
6339            })?;
6340        for v in &mut __struct.mode_name {
6341            let val = buf.get_u8();
6342            *v = val;
6343        }
6344        Ok(__struct)
6345    }
6346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6347        let mut __tmp = BytesMut::new(bytes);
6348        #[allow(clippy::absurd_extreme_comparisons)]
6349        #[allow(unused_comparisons)]
6350        if __tmp.remaining() < Self::ENCODED_LEN {
6351            panic!(
6352                "buffer is too small (need {} bytes, but got {})",
6353                Self::ENCODED_LEN,
6354                __tmp.remaining(),
6355            )
6356        }
6357        __tmp.put_u32_le(self.custom_mode);
6358        __tmp.put_u32_le(self.properties.bits());
6359        __tmp.put_u8(self.number_modes);
6360        __tmp.put_u8(self.mode_index);
6361        __tmp.put_u8(self.standard_mode as u8);
6362        for val in &self.mode_name {
6363            __tmp.put_u8(*val);
6364        }
6365        if matches!(version, MavlinkVersion::V2) {
6366            let len = __tmp.len();
6367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6368        } else {
6369            __tmp.len()
6370        }
6371    }
6372}
6373#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6374#[doc = ""]
6375#[doc = "ID: 437"]
6376#[derive(Debug, Clone, PartialEq)]
6377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6379#[cfg_attr(feature = "ts", derive(TS))]
6380#[cfg_attr(feature = "ts", ts(export))]
6381pub struct AVAILABLE_MODES_MONITOR_DATA {
6382    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6383    pub seq: u8,
6384}
6385impl AVAILABLE_MODES_MONITOR_DATA {
6386    pub const ENCODED_LEN: usize = 1usize;
6387    pub const DEFAULT: Self = Self { seq: 0_u8 };
6388    #[cfg(feature = "arbitrary")]
6389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6390        use arbitrary::{Arbitrary, Unstructured};
6391        let mut buf = [0u8; 1024];
6392        rng.fill_bytes(&mut buf);
6393        let mut unstructured = Unstructured::new(&buf);
6394        Self::arbitrary(&mut unstructured).unwrap_or_default()
6395    }
6396}
6397impl Default for AVAILABLE_MODES_MONITOR_DATA {
6398    fn default() -> Self {
6399        Self::DEFAULT.clone()
6400    }
6401}
6402impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6403    type Message = MavMessage;
6404    const ID: u32 = 437u32;
6405    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6406    const EXTRA_CRC: u8 = 30u8;
6407    const ENCODED_LEN: usize = 1usize;
6408    fn deser(
6409        _version: MavlinkVersion,
6410        __input: &[u8],
6411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6412        let avail_len = __input.len();
6413        let mut payload_buf = [0; Self::ENCODED_LEN];
6414        let mut buf = if avail_len < Self::ENCODED_LEN {
6415            payload_buf[0..avail_len].copy_from_slice(__input);
6416            Bytes::new(&payload_buf)
6417        } else {
6418            Bytes::new(__input)
6419        };
6420        let mut __struct = Self::default();
6421        __struct.seq = buf.get_u8();
6422        Ok(__struct)
6423    }
6424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6425        let mut __tmp = BytesMut::new(bytes);
6426        #[allow(clippy::absurd_extreme_comparisons)]
6427        #[allow(unused_comparisons)]
6428        if __tmp.remaining() < Self::ENCODED_LEN {
6429            panic!(
6430                "buffer is too small (need {} bytes, but got {})",
6431                Self::ENCODED_LEN,
6432                __tmp.remaining(),
6433            )
6434        }
6435        __tmp.put_u8(self.seq);
6436        if matches!(version, MavlinkVersion::V2) {
6437            let len = __tmp.len();
6438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6439        } else {
6440            __tmp.len()
6441        }
6442    }
6443}
6444#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6445#[doc = ""]
6446#[doc = "ID: 372"]
6447#[derive(Debug, Clone, PartialEq)]
6448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6450#[cfg_attr(feature = "ts", derive(TS))]
6451#[cfg_attr(feature = "ts", ts(export))]
6452pub struct BATTERY_INFO_DATA {
6453    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6454    pub discharge_minimum_voltage: f32,
6455    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6456    pub charging_minimum_voltage: f32,
6457    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6458    pub resting_minimum_voltage: f32,
6459    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6460    pub charging_maximum_voltage: f32,
6461    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6462    pub charging_maximum_current: f32,
6463    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6464    pub nominal_voltage: f32,
6465    #[doc = "Maximum pack discharge current. 0: field not provided."]
6466    pub discharge_maximum_current: f32,
6467    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6468    pub discharge_maximum_burst_current: f32,
6469    #[doc = "Fully charged design capacity. 0: field not provided."]
6470    pub design_capacity: f32,
6471    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6472    pub full_charge_capacity: f32,
6473    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6474    pub cycle_count: u16,
6475    #[doc = "Battery weight. 0: field not provided."]
6476    pub weight: u16,
6477    #[doc = "Battery ID"]
6478    pub id: u8,
6479    #[doc = "Function of the battery."]
6480    pub battery_function: MavBatteryFunction,
6481    #[doc = "Type (chemistry) of the battery."]
6482    pub mavtype: MavBatteryType,
6483    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6484    pub state_of_health: u8,
6485    #[doc = "Number of battery cells in series. 0: field not provided."]
6486    pub cells_in_series: u8,
6487    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6488    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6489    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6490    pub manufacture_date: [u8; 9],
6491    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6492    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6493    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6494    pub serial_number: [u8; 32],
6495    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6497    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6498    pub name: [u8; 50],
6499}
6500impl BATTERY_INFO_DATA {
6501    pub const ENCODED_LEN: usize = 140usize;
6502    pub const DEFAULT: Self = Self {
6503        discharge_minimum_voltage: 0.0_f32,
6504        charging_minimum_voltage: 0.0_f32,
6505        resting_minimum_voltage: 0.0_f32,
6506        charging_maximum_voltage: 0.0_f32,
6507        charging_maximum_current: 0.0_f32,
6508        nominal_voltage: 0.0_f32,
6509        discharge_maximum_current: 0.0_f32,
6510        discharge_maximum_burst_current: 0.0_f32,
6511        design_capacity: 0.0_f32,
6512        full_charge_capacity: 0.0_f32,
6513        cycle_count: 0_u16,
6514        weight: 0_u16,
6515        id: 0_u8,
6516        battery_function: MavBatteryFunction::DEFAULT,
6517        mavtype: MavBatteryType::DEFAULT,
6518        state_of_health: 0_u8,
6519        cells_in_series: 0_u8,
6520        manufacture_date: [0_u8; 9usize],
6521        serial_number: [0_u8; 32usize],
6522        name: [0_u8; 50usize],
6523    };
6524    #[cfg(feature = "arbitrary")]
6525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6526        use arbitrary::{Arbitrary, Unstructured};
6527        let mut buf = [0u8; 1024];
6528        rng.fill_bytes(&mut buf);
6529        let mut unstructured = Unstructured::new(&buf);
6530        Self::arbitrary(&mut unstructured).unwrap_or_default()
6531    }
6532}
6533impl Default for BATTERY_INFO_DATA {
6534    fn default() -> Self {
6535        Self::DEFAULT.clone()
6536    }
6537}
6538impl MessageData for BATTERY_INFO_DATA {
6539    type Message = MavMessage;
6540    const ID: u32 = 372u32;
6541    const NAME: &'static str = "BATTERY_INFO";
6542    const EXTRA_CRC: u8 = 26u8;
6543    const ENCODED_LEN: usize = 140usize;
6544    fn deser(
6545        _version: MavlinkVersion,
6546        __input: &[u8],
6547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6548        let avail_len = __input.len();
6549        let mut payload_buf = [0; Self::ENCODED_LEN];
6550        let mut buf = if avail_len < Self::ENCODED_LEN {
6551            payload_buf[0..avail_len].copy_from_slice(__input);
6552            Bytes::new(&payload_buf)
6553        } else {
6554            Bytes::new(__input)
6555        };
6556        let mut __struct = Self::default();
6557        __struct.discharge_minimum_voltage = buf.get_f32_le();
6558        __struct.charging_minimum_voltage = buf.get_f32_le();
6559        __struct.resting_minimum_voltage = buf.get_f32_le();
6560        __struct.charging_maximum_voltage = buf.get_f32_le();
6561        __struct.charging_maximum_current = buf.get_f32_le();
6562        __struct.nominal_voltage = buf.get_f32_le();
6563        __struct.discharge_maximum_current = buf.get_f32_le();
6564        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6565        __struct.design_capacity = buf.get_f32_le();
6566        __struct.full_charge_capacity = buf.get_f32_le();
6567        __struct.cycle_count = buf.get_u16_le();
6568        __struct.weight = buf.get_u16_le();
6569        __struct.id = buf.get_u8();
6570        let tmp = buf.get_u8();
6571        __struct.battery_function =
6572            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6573                enum_type: "MavBatteryFunction",
6574                value: tmp as u32,
6575            })?;
6576        let tmp = buf.get_u8();
6577        __struct.mavtype =
6578            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6579                enum_type: "MavBatteryType",
6580                value: tmp as u32,
6581            })?;
6582        __struct.state_of_health = buf.get_u8();
6583        __struct.cells_in_series = buf.get_u8();
6584        for v in &mut __struct.manufacture_date {
6585            let val = buf.get_u8();
6586            *v = val;
6587        }
6588        for v in &mut __struct.serial_number {
6589            let val = buf.get_u8();
6590            *v = val;
6591        }
6592        for v in &mut __struct.name {
6593            let val = buf.get_u8();
6594            *v = val;
6595        }
6596        Ok(__struct)
6597    }
6598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6599        let mut __tmp = BytesMut::new(bytes);
6600        #[allow(clippy::absurd_extreme_comparisons)]
6601        #[allow(unused_comparisons)]
6602        if __tmp.remaining() < Self::ENCODED_LEN {
6603            panic!(
6604                "buffer is too small (need {} bytes, but got {})",
6605                Self::ENCODED_LEN,
6606                __tmp.remaining(),
6607            )
6608        }
6609        __tmp.put_f32_le(self.discharge_minimum_voltage);
6610        __tmp.put_f32_le(self.charging_minimum_voltage);
6611        __tmp.put_f32_le(self.resting_minimum_voltage);
6612        __tmp.put_f32_le(self.charging_maximum_voltage);
6613        __tmp.put_f32_le(self.charging_maximum_current);
6614        __tmp.put_f32_le(self.nominal_voltage);
6615        __tmp.put_f32_le(self.discharge_maximum_current);
6616        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6617        __tmp.put_f32_le(self.design_capacity);
6618        __tmp.put_f32_le(self.full_charge_capacity);
6619        __tmp.put_u16_le(self.cycle_count);
6620        __tmp.put_u16_le(self.weight);
6621        __tmp.put_u8(self.id);
6622        __tmp.put_u8(self.battery_function as u8);
6623        __tmp.put_u8(self.mavtype as u8);
6624        __tmp.put_u8(self.state_of_health);
6625        __tmp.put_u8(self.cells_in_series);
6626        for val in &self.manufacture_date {
6627            __tmp.put_u8(*val);
6628        }
6629        for val in &self.serial_number {
6630            __tmp.put_u8(*val);
6631        }
6632        for val in &self.name {
6633            __tmp.put_u8(*val);
6634        }
6635        if matches!(version, MavlinkVersion::V2) {
6636            let len = __tmp.len();
6637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6638        } else {
6639            __tmp.len()
6640        }
6641    }
6642}
6643#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6644#[doc = ""]
6645#[doc = "ID: 147"]
6646#[derive(Debug, Clone, PartialEq)]
6647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6649#[cfg_attr(feature = "ts", derive(TS))]
6650#[cfg_attr(feature = "ts", ts(export))]
6651pub struct BATTERY_STATUS_DATA {
6652    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6653    pub current_consumed: i32,
6654    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6655    pub energy_consumed: i32,
6656    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6657    pub temperature: i16,
6658    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6659    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6660    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6661    pub voltages: [u16; 10],
6662    #[doc = "Battery current, -1: autopilot does not measure the current"]
6663    pub current_battery: i16,
6664    #[doc = "Battery ID"]
6665    pub id: u8,
6666    #[doc = "Function of the battery"]
6667    pub battery_function: MavBatteryFunction,
6668    #[doc = "Type (chemistry) of the battery"]
6669    pub mavtype: MavBatteryType,
6670    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6671    pub battery_remaining: i8,
6672    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6673    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6674    pub time_remaining: i32,
6675    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6676    #[cfg_attr(feature = "serde", serde(default))]
6677    pub charge_state: MavBatteryChargeState,
6678    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6682    pub voltages_ext: [u16; 4],
6683    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6684    #[cfg_attr(feature = "serde", serde(default))]
6685    pub mode: MavBatteryMode,
6686    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6687    #[cfg_attr(feature = "serde", serde(default))]
6688    pub fault_bitmask: MavBatteryFault,
6689}
6690impl BATTERY_STATUS_DATA {
6691    pub const ENCODED_LEN: usize = 54usize;
6692    pub const DEFAULT: Self = Self {
6693        current_consumed: 0_i32,
6694        energy_consumed: 0_i32,
6695        temperature: 0_i16,
6696        voltages: [0_u16; 10usize],
6697        current_battery: 0_i16,
6698        id: 0_u8,
6699        battery_function: MavBatteryFunction::DEFAULT,
6700        mavtype: MavBatteryType::DEFAULT,
6701        battery_remaining: 0_i8,
6702        time_remaining: 0_i32,
6703        charge_state: MavBatteryChargeState::DEFAULT,
6704        voltages_ext: [0_u16; 4usize],
6705        mode: MavBatteryMode::DEFAULT,
6706        fault_bitmask: MavBatteryFault::DEFAULT,
6707    };
6708    #[cfg(feature = "arbitrary")]
6709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6710        use arbitrary::{Arbitrary, Unstructured};
6711        let mut buf = [0u8; 1024];
6712        rng.fill_bytes(&mut buf);
6713        let mut unstructured = Unstructured::new(&buf);
6714        Self::arbitrary(&mut unstructured).unwrap_or_default()
6715    }
6716}
6717impl Default for BATTERY_STATUS_DATA {
6718    fn default() -> Self {
6719        Self::DEFAULT.clone()
6720    }
6721}
6722impl MessageData for BATTERY_STATUS_DATA {
6723    type Message = MavMessage;
6724    const ID: u32 = 147u32;
6725    const NAME: &'static str = "BATTERY_STATUS";
6726    const EXTRA_CRC: u8 = 154u8;
6727    const ENCODED_LEN: usize = 54usize;
6728    fn deser(
6729        _version: MavlinkVersion,
6730        __input: &[u8],
6731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6732        let avail_len = __input.len();
6733        let mut payload_buf = [0; Self::ENCODED_LEN];
6734        let mut buf = if avail_len < Self::ENCODED_LEN {
6735            payload_buf[0..avail_len].copy_from_slice(__input);
6736            Bytes::new(&payload_buf)
6737        } else {
6738            Bytes::new(__input)
6739        };
6740        let mut __struct = Self::default();
6741        __struct.current_consumed = buf.get_i32_le();
6742        __struct.energy_consumed = buf.get_i32_le();
6743        __struct.temperature = buf.get_i16_le();
6744        for v in &mut __struct.voltages {
6745            let val = buf.get_u16_le();
6746            *v = val;
6747        }
6748        __struct.current_battery = buf.get_i16_le();
6749        __struct.id = buf.get_u8();
6750        let tmp = buf.get_u8();
6751        __struct.battery_function =
6752            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6753                enum_type: "MavBatteryFunction",
6754                value: tmp as u32,
6755            })?;
6756        let tmp = buf.get_u8();
6757        __struct.mavtype =
6758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6759                enum_type: "MavBatteryType",
6760                value: tmp as u32,
6761            })?;
6762        __struct.battery_remaining = buf.get_i8();
6763        __struct.time_remaining = buf.get_i32_le();
6764        let tmp = buf.get_u8();
6765        __struct.charge_state =
6766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6767                enum_type: "MavBatteryChargeState",
6768                value: tmp as u32,
6769            })?;
6770        for v in &mut __struct.voltages_ext {
6771            let val = buf.get_u16_le();
6772            *v = val;
6773        }
6774        let tmp = buf.get_u8();
6775        __struct.mode =
6776            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6777                enum_type: "MavBatteryMode",
6778                value: tmp as u32,
6779            })?;
6780        let tmp = buf.get_u32_le();
6781        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6782            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6783                flag_type: "MavBatteryFault",
6784                value: tmp as u32,
6785            })?;
6786        Ok(__struct)
6787    }
6788    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6789        let mut __tmp = BytesMut::new(bytes);
6790        #[allow(clippy::absurd_extreme_comparisons)]
6791        #[allow(unused_comparisons)]
6792        if __tmp.remaining() < Self::ENCODED_LEN {
6793            panic!(
6794                "buffer is too small (need {} bytes, but got {})",
6795                Self::ENCODED_LEN,
6796                __tmp.remaining(),
6797            )
6798        }
6799        __tmp.put_i32_le(self.current_consumed);
6800        __tmp.put_i32_le(self.energy_consumed);
6801        __tmp.put_i16_le(self.temperature);
6802        for val in &self.voltages {
6803            __tmp.put_u16_le(*val);
6804        }
6805        __tmp.put_i16_le(self.current_battery);
6806        __tmp.put_u8(self.id);
6807        __tmp.put_u8(self.battery_function as u8);
6808        __tmp.put_u8(self.mavtype as u8);
6809        __tmp.put_i8(self.battery_remaining);
6810        if matches!(version, MavlinkVersion::V2) {
6811            __tmp.put_i32_le(self.time_remaining);
6812            __tmp.put_u8(self.charge_state as u8);
6813            for val in &self.voltages_ext {
6814                __tmp.put_u16_le(*val);
6815            }
6816            __tmp.put_u8(self.mode as u8);
6817            __tmp.put_u32_le(self.fault_bitmask.bits());
6818            let len = __tmp.len();
6819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6820        } else {
6821            __tmp.len()
6822        }
6823    }
6824}
6825#[doc = "Report button state change."]
6826#[doc = ""]
6827#[doc = "ID: 257"]
6828#[derive(Debug, Clone, PartialEq)]
6829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6831#[cfg_attr(feature = "ts", derive(TS))]
6832#[cfg_attr(feature = "ts", ts(export))]
6833pub struct BUTTON_CHANGE_DATA {
6834    #[doc = "Timestamp (time since system boot)."]
6835    pub time_boot_ms: u32,
6836    #[doc = "Time of last change of button state."]
6837    pub last_change_ms: u32,
6838    #[doc = "Bitmap for state of buttons."]
6839    pub state: u8,
6840}
6841impl BUTTON_CHANGE_DATA {
6842    pub const ENCODED_LEN: usize = 9usize;
6843    pub const DEFAULT: Self = Self {
6844        time_boot_ms: 0_u32,
6845        last_change_ms: 0_u32,
6846        state: 0_u8,
6847    };
6848    #[cfg(feature = "arbitrary")]
6849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6850        use arbitrary::{Arbitrary, Unstructured};
6851        let mut buf = [0u8; 1024];
6852        rng.fill_bytes(&mut buf);
6853        let mut unstructured = Unstructured::new(&buf);
6854        Self::arbitrary(&mut unstructured).unwrap_or_default()
6855    }
6856}
6857impl Default for BUTTON_CHANGE_DATA {
6858    fn default() -> Self {
6859        Self::DEFAULT.clone()
6860    }
6861}
6862impl MessageData for BUTTON_CHANGE_DATA {
6863    type Message = MavMessage;
6864    const ID: u32 = 257u32;
6865    const NAME: &'static str = "BUTTON_CHANGE";
6866    const EXTRA_CRC: u8 = 131u8;
6867    const ENCODED_LEN: usize = 9usize;
6868    fn deser(
6869        _version: MavlinkVersion,
6870        __input: &[u8],
6871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6872        let avail_len = __input.len();
6873        let mut payload_buf = [0; Self::ENCODED_LEN];
6874        let mut buf = if avail_len < Self::ENCODED_LEN {
6875            payload_buf[0..avail_len].copy_from_slice(__input);
6876            Bytes::new(&payload_buf)
6877        } else {
6878            Bytes::new(__input)
6879        };
6880        let mut __struct = Self::default();
6881        __struct.time_boot_ms = buf.get_u32_le();
6882        __struct.last_change_ms = buf.get_u32_le();
6883        __struct.state = buf.get_u8();
6884        Ok(__struct)
6885    }
6886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6887        let mut __tmp = BytesMut::new(bytes);
6888        #[allow(clippy::absurd_extreme_comparisons)]
6889        #[allow(unused_comparisons)]
6890        if __tmp.remaining() < Self::ENCODED_LEN {
6891            panic!(
6892                "buffer is too small (need {} bytes, but got {})",
6893                Self::ENCODED_LEN,
6894                __tmp.remaining(),
6895            )
6896        }
6897        __tmp.put_u32_le(self.time_boot_ms);
6898        __tmp.put_u32_le(self.last_change_ms);
6899        __tmp.put_u8(self.state);
6900        if matches!(version, MavlinkVersion::V2) {
6901            let len = __tmp.len();
6902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6903        } else {
6904            __tmp.len()
6905        }
6906    }
6907}
6908#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6909#[doc = ""]
6910#[doc = "ID: 262"]
6911#[derive(Debug, Clone, PartialEq)]
6912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6914#[cfg_attr(feature = "ts", derive(TS))]
6915#[cfg_attr(feature = "ts", ts(export))]
6916pub struct CAMERA_CAPTURE_STATUS_DATA {
6917    #[doc = "Timestamp (time since system boot)."]
6918    pub time_boot_ms: u32,
6919    #[doc = "Image capture interval"]
6920    pub image_interval: f32,
6921    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6922    pub recording_time_ms: u32,
6923    #[doc = "Available storage capacity."]
6924    pub available_capacity: f32,
6925    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6926    pub image_status: u8,
6927    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6928    pub video_status: u8,
6929    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6931    pub image_count: i32,
6932    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6934    pub camera_device_id: u8,
6935}
6936impl CAMERA_CAPTURE_STATUS_DATA {
6937    pub const ENCODED_LEN: usize = 23usize;
6938    pub const DEFAULT: Self = Self {
6939        time_boot_ms: 0_u32,
6940        image_interval: 0.0_f32,
6941        recording_time_ms: 0_u32,
6942        available_capacity: 0.0_f32,
6943        image_status: 0_u8,
6944        video_status: 0_u8,
6945        image_count: 0_i32,
6946        camera_device_id: 0_u8,
6947    };
6948    #[cfg(feature = "arbitrary")]
6949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6950        use arbitrary::{Arbitrary, Unstructured};
6951        let mut buf = [0u8; 1024];
6952        rng.fill_bytes(&mut buf);
6953        let mut unstructured = Unstructured::new(&buf);
6954        Self::arbitrary(&mut unstructured).unwrap_or_default()
6955    }
6956}
6957impl Default for CAMERA_CAPTURE_STATUS_DATA {
6958    fn default() -> Self {
6959        Self::DEFAULT.clone()
6960    }
6961}
6962impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6963    type Message = MavMessage;
6964    const ID: u32 = 262u32;
6965    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6966    const EXTRA_CRC: u8 = 12u8;
6967    const ENCODED_LEN: usize = 23usize;
6968    fn deser(
6969        _version: MavlinkVersion,
6970        __input: &[u8],
6971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6972        let avail_len = __input.len();
6973        let mut payload_buf = [0; Self::ENCODED_LEN];
6974        let mut buf = if avail_len < Self::ENCODED_LEN {
6975            payload_buf[0..avail_len].copy_from_slice(__input);
6976            Bytes::new(&payload_buf)
6977        } else {
6978            Bytes::new(__input)
6979        };
6980        let mut __struct = Self::default();
6981        __struct.time_boot_ms = buf.get_u32_le();
6982        __struct.image_interval = buf.get_f32_le();
6983        __struct.recording_time_ms = buf.get_u32_le();
6984        __struct.available_capacity = buf.get_f32_le();
6985        __struct.image_status = buf.get_u8();
6986        __struct.video_status = buf.get_u8();
6987        __struct.image_count = buf.get_i32_le();
6988        __struct.camera_device_id = buf.get_u8();
6989        Ok(__struct)
6990    }
6991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6992        let mut __tmp = BytesMut::new(bytes);
6993        #[allow(clippy::absurd_extreme_comparisons)]
6994        #[allow(unused_comparisons)]
6995        if __tmp.remaining() < Self::ENCODED_LEN {
6996            panic!(
6997                "buffer is too small (need {} bytes, but got {})",
6998                Self::ENCODED_LEN,
6999                __tmp.remaining(),
7000            )
7001        }
7002        __tmp.put_u32_le(self.time_boot_ms);
7003        __tmp.put_f32_le(self.image_interval);
7004        __tmp.put_u32_le(self.recording_time_ms);
7005        __tmp.put_f32_le(self.available_capacity);
7006        __tmp.put_u8(self.image_status);
7007        __tmp.put_u8(self.video_status);
7008        if matches!(version, MavlinkVersion::V2) {
7009            __tmp.put_i32_le(self.image_count);
7010            __tmp.put_u8(self.camera_device_id);
7011            let len = __tmp.len();
7012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7013        } else {
7014            __tmp.len()
7015        }
7016    }
7017}
7018#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7019#[doc = ""]
7020#[doc = "ID: 271"]
7021#[derive(Debug, Clone, PartialEq)]
7022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7024#[cfg_attr(feature = "ts", derive(TS))]
7025#[cfg_attr(feature = "ts", ts(export))]
7026pub struct CAMERA_FOV_STATUS_DATA {
7027    #[doc = "Timestamp (time since system boot)."]
7028    pub time_boot_ms: u32,
7029    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7030    pub lat_camera: i32,
7031    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7032    pub lon_camera: i32,
7033    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7034    pub alt_camera: i32,
7035    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7036    pub lat_image: i32,
7037    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7038    pub lon_image: i32,
7039    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7040    pub alt_image: i32,
7041    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7042    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7043    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7044    pub q: [f32; 4],
7045    #[doc = "Horizontal field of view (NaN if unknown)."]
7046    pub hfov: f32,
7047    #[doc = "Vertical field of view (NaN if unknown)."]
7048    pub vfov: f32,
7049    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7050    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7051    pub camera_device_id: u8,
7052}
7053impl CAMERA_FOV_STATUS_DATA {
7054    pub const ENCODED_LEN: usize = 53usize;
7055    pub const DEFAULT: Self = Self {
7056        time_boot_ms: 0_u32,
7057        lat_camera: 0_i32,
7058        lon_camera: 0_i32,
7059        alt_camera: 0_i32,
7060        lat_image: 0_i32,
7061        lon_image: 0_i32,
7062        alt_image: 0_i32,
7063        q: [0.0_f32; 4usize],
7064        hfov: 0.0_f32,
7065        vfov: 0.0_f32,
7066        camera_device_id: 0_u8,
7067    };
7068    #[cfg(feature = "arbitrary")]
7069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7070        use arbitrary::{Arbitrary, Unstructured};
7071        let mut buf = [0u8; 1024];
7072        rng.fill_bytes(&mut buf);
7073        let mut unstructured = Unstructured::new(&buf);
7074        Self::arbitrary(&mut unstructured).unwrap_or_default()
7075    }
7076}
7077impl Default for CAMERA_FOV_STATUS_DATA {
7078    fn default() -> Self {
7079        Self::DEFAULT.clone()
7080    }
7081}
7082impl MessageData for CAMERA_FOV_STATUS_DATA {
7083    type Message = MavMessage;
7084    const ID: u32 = 271u32;
7085    const NAME: &'static str = "CAMERA_FOV_STATUS";
7086    const EXTRA_CRC: u8 = 22u8;
7087    const ENCODED_LEN: usize = 53usize;
7088    fn deser(
7089        _version: MavlinkVersion,
7090        __input: &[u8],
7091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7092        let avail_len = __input.len();
7093        let mut payload_buf = [0; Self::ENCODED_LEN];
7094        let mut buf = if avail_len < Self::ENCODED_LEN {
7095            payload_buf[0..avail_len].copy_from_slice(__input);
7096            Bytes::new(&payload_buf)
7097        } else {
7098            Bytes::new(__input)
7099        };
7100        let mut __struct = Self::default();
7101        __struct.time_boot_ms = buf.get_u32_le();
7102        __struct.lat_camera = buf.get_i32_le();
7103        __struct.lon_camera = buf.get_i32_le();
7104        __struct.alt_camera = buf.get_i32_le();
7105        __struct.lat_image = buf.get_i32_le();
7106        __struct.lon_image = buf.get_i32_le();
7107        __struct.alt_image = buf.get_i32_le();
7108        for v in &mut __struct.q {
7109            let val = buf.get_f32_le();
7110            *v = val;
7111        }
7112        __struct.hfov = buf.get_f32_le();
7113        __struct.vfov = buf.get_f32_le();
7114        __struct.camera_device_id = buf.get_u8();
7115        Ok(__struct)
7116    }
7117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7118        let mut __tmp = BytesMut::new(bytes);
7119        #[allow(clippy::absurd_extreme_comparisons)]
7120        #[allow(unused_comparisons)]
7121        if __tmp.remaining() < Self::ENCODED_LEN {
7122            panic!(
7123                "buffer is too small (need {} bytes, but got {})",
7124                Self::ENCODED_LEN,
7125                __tmp.remaining(),
7126            )
7127        }
7128        __tmp.put_u32_le(self.time_boot_ms);
7129        __tmp.put_i32_le(self.lat_camera);
7130        __tmp.put_i32_le(self.lon_camera);
7131        __tmp.put_i32_le(self.alt_camera);
7132        __tmp.put_i32_le(self.lat_image);
7133        __tmp.put_i32_le(self.lon_image);
7134        __tmp.put_i32_le(self.alt_image);
7135        for val in &self.q {
7136            __tmp.put_f32_le(*val);
7137        }
7138        __tmp.put_f32_le(self.hfov);
7139        __tmp.put_f32_le(self.vfov);
7140        if matches!(version, MavlinkVersion::V2) {
7141            __tmp.put_u8(self.camera_device_id);
7142            let len = __tmp.len();
7143            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7144        } else {
7145            __tmp.len()
7146        }
7147    }
7148}
7149#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7150#[doc = ""]
7151#[doc = "ID: 263"]
7152#[derive(Debug, Clone, PartialEq)]
7153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7155#[cfg_attr(feature = "ts", derive(TS))]
7156#[cfg_attr(feature = "ts", ts(export))]
7157pub struct CAMERA_IMAGE_CAPTURED_DATA {
7158    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7159    pub time_utc: u64,
7160    #[doc = "Timestamp (time since system boot)."]
7161    pub time_boot_ms: u32,
7162    #[doc = "Latitude where image was taken"]
7163    pub lat: i32,
7164    #[doc = "Longitude where capture was taken"]
7165    pub lon: i32,
7166    #[doc = "Altitude (MSL) where image was taken"]
7167    pub alt: i32,
7168    #[doc = "Altitude above ground"]
7169    pub relative_alt: i32,
7170    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7171    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7172    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7173    pub q: [f32; 4],
7174    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7175    pub image_index: i32,
7176    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7177    pub camera_id: u8,
7178    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7179    pub capture_result: i8,
7180    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7183    pub file_url: [u8; 205],
7184}
7185impl CAMERA_IMAGE_CAPTURED_DATA {
7186    pub const ENCODED_LEN: usize = 255usize;
7187    pub const DEFAULT: Self = Self {
7188        time_utc: 0_u64,
7189        time_boot_ms: 0_u32,
7190        lat: 0_i32,
7191        lon: 0_i32,
7192        alt: 0_i32,
7193        relative_alt: 0_i32,
7194        q: [0.0_f32; 4usize],
7195        image_index: 0_i32,
7196        camera_id: 0_u8,
7197        capture_result: 0_i8,
7198        file_url: [0_u8; 205usize],
7199    };
7200    #[cfg(feature = "arbitrary")]
7201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7202        use arbitrary::{Arbitrary, Unstructured};
7203        let mut buf = [0u8; 1024];
7204        rng.fill_bytes(&mut buf);
7205        let mut unstructured = Unstructured::new(&buf);
7206        Self::arbitrary(&mut unstructured).unwrap_or_default()
7207    }
7208}
7209impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7210    fn default() -> Self {
7211        Self::DEFAULT.clone()
7212    }
7213}
7214impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7215    type Message = MavMessage;
7216    const ID: u32 = 263u32;
7217    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7218    const EXTRA_CRC: u8 = 133u8;
7219    const ENCODED_LEN: usize = 255usize;
7220    fn deser(
7221        _version: MavlinkVersion,
7222        __input: &[u8],
7223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7224        let avail_len = __input.len();
7225        let mut payload_buf = [0; Self::ENCODED_LEN];
7226        let mut buf = if avail_len < Self::ENCODED_LEN {
7227            payload_buf[0..avail_len].copy_from_slice(__input);
7228            Bytes::new(&payload_buf)
7229        } else {
7230            Bytes::new(__input)
7231        };
7232        let mut __struct = Self::default();
7233        __struct.time_utc = buf.get_u64_le();
7234        __struct.time_boot_ms = buf.get_u32_le();
7235        __struct.lat = buf.get_i32_le();
7236        __struct.lon = buf.get_i32_le();
7237        __struct.alt = buf.get_i32_le();
7238        __struct.relative_alt = buf.get_i32_le();
7239        for v in &mut __struct.q {
7240            let val = buf.get_f32_le();
7241            *v = val;
7242        }
7243        __struct.image_index = buf.get_i32_le();
7244        __struct.camera_id = buf.get_u8();
7245        __struct.capture_result = buf.get_i8();
7246        for v in &mut __struct.file_url {
7247            let val = buf.get_u8();
7248            *v = val;
7249        }
7250        Ok(__struct)
7251    }
7252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7253        let mut __tmp = BytesMut::new(bytes);
7254        #[allow(clippy::absurd_extreme_comparisons)]
7255        #[allow(unused_comparisons)]
7256        if __tmp.remaining() < Self::ENCODED_LEN {
7257            panic!(
7258                "buffer is too small (need {} bytes, but got {})",
7259                Self::ENCODED_LEN,
7260                __tmp.remaining(),
7261            )
7262        }
7263        __tmp.put_u64_le(self.time_utc);
7264        __tmp.put_u32_le(self.time_boot_ms);
7265        __tmp.put_i32_le(self.lat);
7266        __tmp.put_i32_le(self.lon);
7267        __tmp.put_i32_le(self.alt);
7268        __tmp.put_i32_le(self.relative_alt);
7269        for val in &self.q {
7270            __tmp.put_f32_le(*val);
7271        }
7272        __tmp.put_i32_le(self.image_index);
7273        __tmp.put_u8(self.camera_id);
7274        __tmp.put_i8(self.capture_result);
7275        for val in &self.file_url {
7276            __tmp.put_u8(*val);
7277        }
7278        if matches!(version, MavlinkVersion::V2) {
7279            let len = __tmp.len();
7280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7281        } else {
7282            __tmp.len()
7283        }
7284    }
7285}
7286#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7287#[doc = ""]
7288#[doc = "ID: 259"]
7289#[derive(Debug, Clone, PartialEq)]
7290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7292#[cfg_attr(feature = "ts", derive(TS))]
7293#[cfg_attr(feature = "ts", ts(export))]
7294pub struct CAMERA_INFORMATION_DATA {
7295    #[doc = "Timestamp (time since system boot)."]
7296    pub time_boot_ms: u32,
7297    #[doc = "0xff). Use 0 if not known."]
7298    pub firmware_version: u32,
7299    #[doc = "Focal length. Use NaN if not known."]
7300    pub focal_length: f32,
7301    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7302    pub sensor_size_h: f32,
7303    #[doc = "Image sensor size vertical. Use NaN if not known."]
7304    pub sensor_size_v: f32,
7305    #[doc = "Bitmap of camera capability flags."]
7306    pub flags: CameraCapFlags,
7307    #[doc = "Horizontal image resolution. Use 0 if not known."]
7308    pub resolution_h: u16,
7309    #[doc = "Vertical image resolution. Use 0 if not known."]
7310    pub resolution_v: u16,
7311    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7312    pub cam_definition_version: u16,
7313    #[doc = "Name of the camera vendor"]
7314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7315    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7316    pub vendor_name: [u8; 32],
7317    #[doc = "Name of the camera model"]
7318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7319    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7320    pub model_name: [u8; 32],
7321    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7322    pub lens_id: u8,
7323    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7324    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7325    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7326    pub cam_definition_uri: [u8; 140],
7327    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7328    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7329    pub gimbal_device_id: u8,
7330    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7331    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7332    pub camera_device_id: u8,
7333}
7334impl CAMERA_INFORMATION_DATA {
7335    pub const ENCODED_LEN: usize = 237usize;
7336    pub const DEFAULT: Self = Self {
7337        time_boot_ms: 0_u32,
7338        firmware_version: 0_u32,
7339        focal_length: 0.0_f32,
7340        sensor_size_h: 0.0_f32,
7341        sensor_size_v: 0.0_f32,
7342        flags: CameraCapFlags::DEFAULT,
7343        resolution_h: 0_u16,
7344        resolution_v: 0_u16,
7345        cam_definition_version: 0_u16,
7346        vendor_name: [0_u8; 32usize],
7347        model_name: [0_u8; 32usize],
7348        lens_id: 0_u8,
7349        cam_definition_uri: [0_u8; 140usize],
7350        gimbal_device_id: 0_u8,
7351        camera_device_id: 0_u8,
7352    };
7353    #[cfg(feature = "arbitrary")]
7354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7355        use arbitrary::{Arbitrary, Unstructured};
7356        let mut buf = [0u8; 1024];
7357        rng.fill_bytes(&mut buf);
7358        let mut unstructured = Unstructured::new(&buf);
7359        Self::arbitrary(&mut unstructured).unwrap_or_default()
7360    }
7361}
7362impl Default for CAMERA_INFORMATION_DATA {
7363    fn default() -> Self {
7364        Self::DEFAULT.clone()
7365    }
7366}
7367impl MessageData for CAMERA_INFORMATION_DATA {
7368    type Message = MavMessage;
7369    const ID: u32 = 259u32;
7370    const NAME: &'static str = "CAMERA_INFORMATION";
7371    const EXTRA_CRC: u8 = 92u8;
7372    const ENCODED_LEN: usize = 237usize;
7373    fn deser(
7374        _version: MavlinkVersion,
7375        __input: &[u8],
7376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7377        let avail_len = __input.len();
7378        let mut payload_buf = [0; Self::ENCODED_LEN];
7379        let mut buf = if avail_len < Self::ENCODED_LEN {
7380            payload_buf[0..avail_len].copy_from_slice(__input);
7381            Bytes::new(&payload_buf)
7382        } else {
7383            Bytes::new(__input)
7384        };
7385        let mut __struct = Self::default();
7386        __struct.time_boot_ms = buf.get_u32_le();
7387        __struct.firmware_version = buf.get_u32_le();
7388        __struct.focal_length = buf.get_f32_le();
7389        __struct.sensor_size_h = buf.get_f32_le();
7390        __struct.sensor_size_v = buf.get_f32_le();
7391        let tmp = buf.get_u32_le();
7392        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7393            ::mavlink_core::error::ParserError::InvalidFlag {
7394                flag_type: "CameraCapFlags",
7395                value: tmp as u32,
7396            },
7397        )?;
7398        __struct.resolution_h = buf.get_u16_le();
7399        __struct.resolution_v = buf.get_u16_le();
7400        __struct.cam_definition_version = buf.get_u16_le();
7401        for v in &mut __struct.vendor_name {
7402            let val = buf.get_u8();
7403            *v = val;
7404        }
7405        for v in &mut __struct.model_name {
7406            let val = buf.get_u8();
7407            *v = val;
7408        }
7409        __struct.lens_id = buf.get_u8();
7410        for v in &mut __struct.cam_definition_uri {
7411            let val = buf.get_u8();
7412            *v = val;
7413        }
7414        __struct.gimbal_device_id = buf.get_u8();
7415        __struct.camera_device_id = buf.get_u8();
7416        Ok(__struct)
7417    }
7418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7419        let mut __tmp = BytesMut::new(bytes);
7420        #[allow(clippy::absurd_extreme_comparisons)]
7421        #[allow(unused_comparisons)]
7422        if __tmp.remaining() < Self::ENCODED_LEN {
7423            panic!(
7424                "buffer is too small (need {} bytes, but got {})",
7425                Self::ENCODED_LEN,
7426                __tmp.remaining(),
7427            )
7428        }
7429        __tmp.put_u32_le(self.time_boot_ms);
7430        __tmp.put_u32_le(self.firmware_version);
7431        __tmp.put_f32_le(self.focal_length);
7432        __tmp.put_f32_le(self.sensor_size_h);
7433        __tmp.put_f32_le(self.sensor_size_v);
7434        __tmp.put_u32_le(self.flags.bits());
7435        __tmp.put_u16_le(self.resolution_h);
7436        __tmp.put_u16_le(self.resolution_v);
7437        __tmp.put_u16_le(self.cam_definition_version);
7438        for val in &self.vendor_name {
7439            __tmp.put_u8(*val);
7440        }
7441        for val in &self.model_name {
7442            __tmp.put_u8(*val);
7443        }
7444        __tmp.put_u8(self.lens_id);
7445        for val in &self.cam_definition_uri {
7446            __tmp.put_u8(*val);
7447        }
7448        if matches!(version, MavlinkVersion::V2) {
7449            __tmp.put_u8(self.gimbal_device_id);
7450            __tmp.put_u8(self.camera_device_id);
7451            let len = __tmp.len();
7452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7453        } else {
7454            __tmp.len()
7455        }
7456    }
7457}
7458#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7459#[doc = ""]
7460#[doc = "ID: 260"]
7461#[derive(Debug, Clone, PartialEq)]
7462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7464#[cfg_attr(feature = "ts", derive(TS))]
7465#[cfg_attr(feature = "ts", ts(export))]
7466pub struct CAMERA_SETTINGS_DATA {
7467    #[doc = "Timestamp (time since system boot)."]
7468    pub time_boot_ms: u32,
7469    #[doc = "Camera mode"]
7470    pub mode_id: CameraMode,
7471    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7472    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7473    pub zoomLevel: f32,
7474    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7476    pub focusLevel: f32,
7477    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7479    pub camera_device_id: u8,
7480}
7481impl CAMERA_SETTINGS_DATA {
7482    pub const ENCODED_LEN: usize = 14usize;
7483    pub const DEFAULT: Self = Self {
7484        time_boot_ms: 0_u32,
7485        mode_id: CameraMode::DEFAULT,
7486        zoomLevel: 0.0_f32,
7487        focusLevel: 0.0_f32,
7488        camera_device_id: 0_u8,
7489    };
7490    #[cfg(feature = "arbitrary")]
7491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7492        use arbitrary::{Arbitrary, Unstructured};
7493        let mut buf = [0u8; 1024];
7494        rng.fill_bytes(&mut buf);
7495        let mut unstructured = Unstructured::new(&buf);
7496        Self::arbitrary(&mut unstructured).unwrap_or_default()
7497    }
7498}
7499impl Default for CAMERA_SETTINGS_DATA {
7500    fn default() -> Self {
7501        Self::DEFAULT.clone()
7502    }
7503}
7504impl MessageData for CAMERA_SETTINGS_DATA {
7505    type Message = MavMessage;
7506    const ID: u32 = 260u32;
7507    const NAME: &'static str = "CAMERA_SETTINGS";
7508    const EXTRA_CRC: u8 = 146u8;
7509    const ENCODED_LEN: usize = 14usize;
7510    fn deser(
7511        _version: MavlinkVersion,
7512        __input: &[u8],
7513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7514        let avail_len = __input.len();
7515        let mut payload_buf = [0; Self::ENCODED_LEN];
7516        let mut buf = if avail_len < Self::ENCODED_LEN {
7517            payload_buf[0..avail_len].copy_from_slice(__input);
7518            Bytes::new(&payload_buf)
7519        } else {
7520            Bytes::new(__input)
7521        };
7522        let mut __struct = Self::default();
7523        __struct.time_boot_ms = buf.get_u32_le();
7524        let tmp = buf.get_u8();
7525        __struct.mode_id =
7526            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7527                enum_type: "CameraMode",
7528                value: tmp as u32,
7529            })?;
7530        __struct.zoomLevel = buf.get_f32_le();
7531        __struct.focusLevel = buf.get_f32_le();
7532        __struct.camera_device_id = buf.get_u8();
7533        Ok(__struct)
7534    }
7535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7536        let mut __tmp = BytesMut::new(bytes);
7537        #[allow(clippy::absurd_extreme_comparisons)]
7538        #[allow(unused_comparisons)]
7539        if __tmp.remaining() < Self::ENCODED_LEN {
7540            panic!(
7541                "buffer is too small (need {} bytes, but got {})",
7542                Self::ENCODED_LEN,
7543                __tmp.remaining(),
7544            )
7545        }
7546        __tmp.put_u32_le(self.time_boot_ms);
7547        __tmp.put_u8(self.mode_id as u8);
7548        if matches!(version, MavlinkVersion::V2) {
7549            __tmp.put_f32_le(self.zoomLevel);
7550            __tmp.put_f32_le(self.focusLevel);
7551            __tmp.put_u8(self.camera_device_id);
7552            let len = __tmp.len();
7553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7554        } else {
7555            __tmp.len()
7556        }
7557    }
7558}
7559#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7560#[doc = ""]
7561#[doc = "ID: 277"]
7562#[derive(Debug, Clone, PartialEq)]
7563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7565#[cfg_attr(feature = "ts", derive(TS))]
7566#[cfg_attr(feature = "ts", ts(export))]
7567pub struct CAMERA_THERMAL_RANGE_DATA {
7568    #[doc = "Timestamp (time since system boot)."]
7569    pub time_boot_ms: u32,
7570    #[doc = "Temperature max."]
7571    pub max: f32,
7572    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7573    pub max_point_x: f32,
7574    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7575    pub max_point_y: f32,
7576    #[doc = "Temperature min."]
7577    pub min: f32,
7578    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7579    pub min_point_x: f32,
7580    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7581    pub min_point_y: f32,
7582    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7583    pub stream_id: u8,
7584    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7585    pub camera_device_id: u8,
7586}
7587impl CAMERA_THERMAL_RANGE_DATA {
7588    pub const ENCODED_LEN: usize = 30usize;
7589    pub const DEFAULT: Self = Self {
7590        time_boot_ms: 0_u32,
7591        max: 0.0_f32,
7592        max_point_x: 0.0_f32,
7593        max_point_y: 0.0_f32,
7594        min: 0.0_f32,
7595        min_point_x: 0.0_f32,
7596        min_point_y: 0.0_f32,
7597        stream_id: 0_u8,
7598        camera_device_id: 0_u8,
7599    };
7600    #[cfg(feature = "arbitrary")]
7601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7602        use arbitrary::{Arbitrary, Unstructured};
7603        let mut buf = [0u8; 1024];
7604        rng.fill_bytes(&mut buf);
7605        let mut unstructured = Unstructured::new(&buf);
7606        Self::arbitrary(&mut unstructured).unwrap_or_default()
7607    }
7608}
7609impl Default for CAMERA_THERMAL_RANGE_DATA {
7610    fn default() -> Self {
7611        Self::DEFAULT.clone()
7612    }
7613}
7614impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7615    type Message = MavMessage;
7616    const ID: u32 = 277u32;
7617    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7618    const EXTRA_CRC: u8 = 62u8;
7619    const ENCODED_LEN: usize = 30usize;
7620    fn deser(
7621        _version: MavlinkVersion,
7622        __input: &[u8],
7623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7624        let avail_len = __input.len();
7625        let mut payload_buf = [0; Self::ENCODED_LEN];
7626        let mut buf = if avail_len < Self::ENCODED_LEN {
7627            payload_buf[0..avail_len].copy_from_slice(__input);
7628            Bytes::new(&payload_buf)
7629        } else {
7630            Bytes::new(__input)
7631        };
7632        let mut __struct = Self::default();
7633        __struct.time_boot_ms = buf.get_u32_le();
7634        __struct.max = buf.get_f32_le();
7635        __struct.max_point_x = buf.get_f32_le();
7636        __struct.max_point_y = buf.get_f32_le();
7637        __struct.min = buf.get_f32_le();
7638        __struct.min_point_x = buf.get_f32_le();
7639        __struct.min_point_y = buf.get_f32_le();
7640        __struct.stream_id = buf.get_u8();
7641        __struct.camera_device_id = buf.get_u8();
7642        Ok(__struct)
7643    }
7644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7645        let mut __tmp = BytesMut::new(bytes);
7646        #[allow(clippy::absurd_extreme_comparisons)]
7647        #[allow(unused_comparisons)]
7648        if __tmp.remaining() < Self::ENCODED_LEN {
7649            panic!(
7650                "buffer is too small (need {} bytes, but got {})",
7651                Self::ENCODED_LEN,
7652                __tmp.remaining(),
7653            )
7654        }
7655        __tmp.put_u32_le(self.time_boot_ms);
7656        __tmp.put_f32_le(self.max);
7657        __tmp.put_f32_le(self.max_point_x);
7658        __tmp.put_f32_le(self.max_point_y);
7659        __tmp.put_f32_le(self.min);
7660        __tmp.put_f32_le(self.min_point_x);
7661        __tmp.put_f32_le(self.min_point_y);
7662        __tmp.put_u8(self.stream_id);
7663        __tmp.put_u8(self.camera_device_id);
7664        if matches!(version, MavlinkVersion::V2) {
7665            let len = __tmp.len();
7666            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7667        } else {
7668            __tmp.len()
7669        }
7670    }
7671}
7672#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7673#[doc = ""]
7674#[doc = "ID: 276"]
7675#[derive(Debug, Clone, PartialEq)]
7676#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7677#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7678#[cfg_attr(feature = "ts", derive(TS))]
7679#[cfg_attr(feature = "ts", ts(export))]
7680pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7681    #[doc = "Latitude of tracked object"]
7682    pub lat: i32,
7683    #[doc = "Longitude of tracked object"]
7684    pub lon: i32,
7685    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7686    pub alt: f32,
7687    #[doc = "Horizontal accuracy. NAN if unknown"]
7688    pub h_acc: f32,
7689    #[doc = "Vertical accuracy. NAN if unknown"]
7690    pub v_acc: f32,
7691    #[doc = "North velocity of tracked object. NAN if unknown"]
7692    pub vel_n: f32,
7693    #[doc = "East velocity of tracked object. NAN if unknown"]
7694    pub vel_e: f32,
7695    #[doc = "Down velocity of tracked object. NAN if unknown"]
7696    pub vel_d: f32,
7697    #[doc = "Velocity accuracy. NAN if unknown"]
7698    pub vel_acc: f32,
7699    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7700    pub dist: f32,
7701    #[doc = "Heading in radians, in NED. NAN if unknown"]
7702    pub hdg: f32,
7703    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7704    pub hdg_acc: f32,
7705    #[doc = "Current tracking status"]
7706    pub tracking_status: CameraTrackingStatusFlags,
7707    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7709    pub camera_device_id: u8,
7710}
7711impl CAMERA_TRACKING_GEO_STATUS_DATA {
7712    pub const ENCODED_LEN: usize = 50usize;
7713    pub const DEFAULT: Self = Self {
7714        lat: 0_i32,
7715        lon: 0_i32,
7716        alt: 0.0_f32,
7717        h_acc: 0.0_f32,
7718        v_acc: 0.0_f32,
7719        vel_n: 0.0_f32,
7720        vel_e: 0.0_f32,
7721        vel_d: 0.0_f32,
7722        vel_acc: 0.0_f32,
7723        dist: 0.0_f32,
7724        hdg: 0.0_f32,
7725        hdg_acc: 0.0_f32,
7726        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7727        camera_device_id: 0_u8,
7728    };
7729    #[cfg(feature = "arbitrary")]
7730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7731        use arbitrary::{Arbitrary, Unstructured};
7732        let mut buf = [0u8; 1024];
7733        rng.fill_bytes(&mut buf);
7734        let mut unstructured = Unstructured::new(&buf);
7735        Self::arbitrary(&mut unstructured).unwrap_or_default()
7736    }
7737}
7738impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7739    fn default() -> Self {
7740        Self::DEFAULT.clone()
7741    }
7742}
7743impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7744    type Message = MavMessage;
7745    const ID: u32 = 276u32;
7746    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7747    const EXTRA_CRC: u8 = 18u8;
7748    const ENCODED_LEN: usize = 50usize;
7749    fn deser(
7750        _version: MavlinkVersion,
7751        __input: &[u8],
7752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7753        let avail_len = __input.len();
7754        let mut payload_buf = [0; Self::ENCODED_LEN];
7755        let mut buf = if avail_len < Self::ENCODED_LEN {
7756            payload_buf[0..avail_len].copy_from_slice(__input);
7757            Bytes::new(&payload_buf)
7758        } else {
7759            Bytes::new(__input)
7760        };
7761        let mut __struct = Self::default();
7762        __struct.lat = buf.get_i32_le();
7763        __struct.lon = buf.get_i32_le();
7764        __struct.alt = buf.get_f32_le();
7765        __struct.h_acc = buf.get_f32_le();
7766        __struct.v_acc = buf.get_f32_le();
7767        __struct.vel_n = buf.get_f32_le();
7768        __struct.vel_e = buf.get_f32_le();
7769        __struct.vel_d = buf.get_f32_le();
7770        __struct.vel_acc = buf.get_f32_le();
7771        __struct.dist = buf.get_f32_le();
7772        __struct.hdg = buf.get_f32_le();
7773        __struct.hdg_acc = buf.get_f32_le();
7774        let tmp = buf.get_u8();
7775        __struct.tracking_status =
7776            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7777                enum_type: "CameraTrackingStatusFlags",
7778                value: tmp as u32,
7779            })?;
7780        __struct.camera_device_id = buf.get_u8();
7781        Ok(__struct)
7782    }
7783    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7784        let mut __tmp = BytesMut::new(bytes);
7785        #[allow(clippy::absurd_extreme_comparisons)]
7786        #[allow(unused_comparisons)]
7787        if __tmp.remaining() < Self::ENCODED_LEN {
7788            panic!(
7789                "buffer is too small (need {} bytes, but got {})",
7790                Self::ENCODED_LEN,
7791                __tmp.remaining(),
7792            )
7793        }
7794        __tmp.put_i32_le(self.lat);
7795        __tmp.put_i32_le(self.lon);
7796        __tmp.put_f32_le(self.alt);
7797        __tmp.put_f32_le(self.h_acc);
7798        __tmp.put_f32_le(self.v_acc);
7799        __tmp.put_f32_le(self.vel_n);
7800        __tmp.put_f32_le(self.vel_e);
7801        __tmp.put_f32_le(self.vel_d);
7802        __tmp.put_f32_le(self.vel_acc);
7803        __tmp.put_f32_le(self.dist);
7804        __tmp.put_f32_le(self.hdg);
7805        __tmp.put_f32_le(self.hdg_acc);
7806        __tmp.put_u8(self.tracking_status as u8);
7807        if matches!(version, MavlinkVersion::V2) {
7808            __tmp.put_u8(self.camera_device_id);
7809            let len = __tmp.len();
7810            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7811        } else {
7812            __tmp.len()
7813        }
7814    }
7815}
7816#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7817#[doc = ""]
7818#[doc = "ID: 275"]
7819#[derive(Debug, Clone, PartialEq)]
7820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7821#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7822#[cfg_attr(feature = "ts", derive(TS))]
7823#[cfg_attr(feature = "ts", ts(export))]
7824pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7825    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7826    pub point_x: f32,
7827    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7828    pub point_y: f32,
7829    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7830    pub radius: f32,
7831    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7832    pub rec_top_x: f32,
7833    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7834    pub rec_top_y: f32,
7835    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7836    pub rec_bottom_x: f32,
7837    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7838    pub rec_bottom_y: f32,
7839    #[doc = "Current tracking status"]
7840    pub tracking_status: CameraTrackingStatusFlags,
7841    #[doc = "Current tracking mode"]
7842    pub tracking_mode: CameraTrackingMode,
7843    #[doc = "Defines location of target data"]
7844    pub target_data: CameraTrackingTargetData,
7845    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7846    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7847    pub camera_device_id: u8,
7848}
7849impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7850    pub const ENCODED_LEN: usize = 32usize;
7851    pub const DEFAULT: Self = Self {
7852        point_x: 0.0_f32,
7853        point_y: 0.0_f32,
7854        radius: 0.0_f32,
7855        rec_top_x: 0.0_f32,
7856        rec_top_y: 0.0_f32,
7857        rec_bottom_x: 0.0_f32,
7858        rec_bottom_y: 0.0_f32,
7859        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7860        tracking_mode: CameraTrackingMode::DEFAULT,
7861        target_data: CameraTrackingTargetData::DEFAULT,
7862        camera_device_id: 0_u8,
7863    };
7864    #[cfg(feature = "arbitrary")]
7865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7866        use arbitrary::{Arbitrary, Unstructured};
7867        let mut buf = [0u8; 1024];
7868        rng.fill_bytes(&mut buf);
7869        let mut unstructured = Unstructured::new(&buf);
7870        Self::arbitrary(&mut unstructured).unwrap_or_default()
7871    }
7872}
7873impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7874    fn default() -> Self {
7875        Self::DEFAULT.clone()
7876    }
7877}
7878impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7879    type Message = MavMessage;
7880    const ID: u32 = 275u32;
7881    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7882    const EXTRA_CRC: u8 = 126u8;
7883    const ENCODED_LEN: usize = 32usize;
7884    fn deser(
7885        _version: MavlinkVersion,
7886        __input: &[u8],
7887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7888        let avail_len = __input.len();
7889        let mut payload_buf = [0; Self::ENCODED_LEN];
7890        let mut buf = if avail_len < Self::ENCODED_LEN {
7891            payload_buf[0..avail_len].copy_from_slice(__input);
7892            Bytes::new(&payload_buf)
7893        } else {
7894            Bytes::new(__input)
7895        };
7896        let mut __struct = Self::default();
7897        __struct.point_x = buf.get_f32_le();
7898        __struct.point_y = buf.get_f32_le();
7899        __struct.radius = buf.get_f32_le();
7900        __struct.rec_top_x = buf.get_f32_le();
7901        __struct.rec_top_y = buf.get_f32_le();
7902        __struct.rec_bottom_x = buf.get_f32_le();
7903        __struct.rec_bottom_y = buf.get_f32_le();
7904        let tmp = buf.get_u8();
7905        __struct.tracking_status =
7906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7907                enum_type: "CameraTrackingStatusFlags",
7908                value: tmp as u32,
7909            })?;
7910        let tmp = buf.get_u8();
7911        __struct.tracking_mode =
7912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7913                enum_type: "CameraTrackingMode",
7914                value: tmp as u32,
7915            })?;
7916        let tmp = buf.get_u8();
7917        __struct.target_data =
7918            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7919                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7920                    flag_type: "CameraTrackingTargetData",
7921                    value: tmp as u32,
7922                })?;
7923        __struct.camera_device_id = buf.get_u8();
7924        Ok(__struct)
7925    }
7926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7927        let mut __tmp = BytesMut::new(bytes);
7928        #[allow(clippy::absurd_extreme_comparisons)]
7929        #[allow(unused_comparisons)]
7930        if __tmp.remaining() < Self::ENCODED_LEN {
7931            panic!(
7932                "buffer is too small (need {} bytes, but got {})",
7933                Self::ENCODED_LEN,
7934                __tmp.remaining(),
7935            )
7936        }
7937        __tmp.put_f32_le(self.point_x);
7938        __tmp.put_f32_le(self.point_y);
7939        __tmp.put_f32_le(self.radius);
7940        __tmp.put_f32_le(self.rec_top_x);
7941        __tmp.put_f32_le(self.rec_top_y);
7942        __tmp.put_f32_le(self.rec_bottom_x);
7943        __tmp.put_f32_le(self.rec_bottom_y);
7944        __tmp.put_u8(self.tracking_status as u8);
7945        __tmp.put_u8(self.tracking_mode as u8);
7946        __tmp.put_u8(self.target_data.bits());
7947        if matches!(version, MavlinkVersion::V2) {
7948            __tmp.put_u8(self.camera_device_id);
7949            let len = __tmp.len();
7950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7951        } else {
7952            __tmp.len()
7953        }
7954    }
7955}
7956#[doc = "Camera-IMU triggering and synchronisation message."]
7957#[doc = ""]
7958#[doc = "ID: 112"]
7959#[derive(Debug, Clone, PartialEq)]
7960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7962#[cfg_attr(feature = "ts", derive(TS))]
7963#[cfg_attr(feature = "ts", ts(export))]
7964pub struct CAMERA_TRIGGER_DATA {
7965    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7966    pub time_usec: u64,
7967    #[doc = "Image frame sequence"]
7968    pub seq: u32,
7969}
7970impl CAMERA_TRIGGER_DATA {
7971    pub const ENCODED_LEN: usize = 12usize;
7972    pub const DEFAULT: Self = Self {
7973        time_usec: 0_u64,
7974        seq: 0_u32,
7975    };
7976    #[cfg(feature = "arbitrary")]
7977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7978        use arbitrary::{Arbitrary, Unstructured};
7979        let mut buf = [0u8; 1024];
7980        rng.fill_bytes(&mut buf);
7981        let mut unstructured = Unstructured::new(&buf);
7982        Self::arbitrary(&mut unstructured).unwrap_or_default()
7983    }
7984}
7985impl Default for CAMERA_TRIGGER_DATA {
7986    fn default() -> Self {
7987        Self::DEFAULT.clone()
7988    }
7989}
7990impl MessageData for CAMERA_TRIGGER_DATA {
7991    type Message = MavMessage;
7992    const ID: u32 = 112u32;
7993    const NAME: &'static str = "CAMERA_TRIGGER";
7994    const EXTRA_CRC: u8 = 174u8;
7995    const ENCODED_LEN: usize = 12usize;
7996    fn deser(
7997        _version: MavlinkVersion,
7998        __input: &[u8],
7999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8000        let avail_len = __input.len();
8001        let mut payload_buf = [0; Self::ENCODED_LEN];
8002        let mut buf = if avail_len < Self::ENCODED_LEN {
8003            payload_buf[0..avail_len].copy_from_slice(__input);
8004            Bytes::new(&payload_buf)
8005        } else {
8006            Bytes::new(__input)
8007        };
8008        let mut __struct = Self::default();
8009        __struct.time_usec = buf.get_u64_le();
8010        __struct.seq = buf.get_u32_le();
8011        Ok(__struct)
8012    }
8013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8014        let mut __tmp = BytesMut::new(bytes);
8015        #[allow(clippy::absurd_extreme_comparisons)]
8016        #[allow(unused_comparisons)]
8017        if __tmp.remaining() < Self::ENCODED_LEN {
8018            panic!(
8019                "buffer is too small (need {} bytes, but got {})",
8020                Self::ENCODED_LEN,
8021                __tmp.remaining(),
8022            )
8023        }
8024        __tmp.put_u64_le(self.time_usec);
8025        __tmp.put_u32_le(self.seq);
8026        if matches!(version, MavlinkVersion::V2) {
8027            let len = __tmp.len();
8028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8029        } else {
8030            __tmp.len()
8031        }
8032    }
8033}
8034#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8035#[doc = ""]
8036#[doc = "ID: 387"]
8037#[derive(Debug, Clone, PartialEq)]
8038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8040#[cfg_attr(feature = "ts", derive(TS))]
8041#[cfg_attr(feature = "ts", ts(export))]
8042pub struct CANFD_FRAME_DATA {
8043    #[doc = "Frame ID"]
8044    pub id: u32,
8045    #[doc = "System ID."]
8046    pub target_system: u8,
8047    #[doc = "Component ID."]
8048    pub target_component: u8,
8049    #[doc = "bus number"]
8050    pub bus: u8,
8051    #[doc = "Frame length"]
8052    pub len: u8,
8053    #[doc = "Frame data"]
8054    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8055    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8056    pub data: [u8; 64],
8057}
8058impl CANFD_FRAME_DATA {
8059    pub const ENCODED_LEN: usize = 72usize;
8060    pub const DEFAULT: Self = Self {
8061        id: 0_u32,
8062        target_system: 0_u8,
8063        target_component: 0_u8,
8064        bus: 0_u8,
8065        len: 0_u8,
8066        data: [0_u8; 64usize],
8067    };
8068    #[cfg(feature = "arbitrary")]
8069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8070        use arbitrary::{Arbitrary, Unstructured};
8071        let mut buf = [0u8; 1024];
8072        rng.fill_bytes(&mut buf);
8073        let mut unstructured = Unstructured::new(&buf);
8074        Self::arbitrary(&mut unstructured).unwrap_or_default()
8075    }
8076}
8077impl Default for CANFD_FRAME_DATA {
8078    fn default() -> Self {
8079        Self::DEFAULT.clone()
8080    }
8081}
8082impl MessageData for CANFD_FRAME_DATA {
8083    type Message = MavMessage;
8084    const ID: u32 = 387u32;
8085    const NAME: &'static str = "CANFD_FRAME";
8086    const EXTRA_CRC: u8 = 4u8;
8087    const ENCODED_LEN: usize = 72usize;
8088    fn deser(
8089        _version: MavlinkVersion,
8090        __input: &[u8],
8091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8092        let avail_len = __input.len();
8093        let mut payload_buf = [0; Self::ENCODED_LEN];
8094        let mut buf = if avail_len < Self::ENCODED_LEN {
8095            payload_buf[0..avail_len].copy_from_slice(__input);
8096            Bytes::new(&payload_buf)
8097        } else {
8098            Bytes::new(__input)
8099        };
8100        let mut __struct = Self::default();
8101        __struct.id = buf.get_u32_le();
8102        __struct.target_system = buf.get_u8();
8103        __struct.target_component = buf.get_u8();
8104        __struct.bus = buf.get_u8();
8105        __struct.len = buf.get_u8();
8106        for v in &mut __struct.data {
8107            let val = buf.get_u8();
8108            *v = val;
8109        }
8110        Ok(__struct)
8111    }
8112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8113        let mut __tmp = BytesMut::new(bytes);
8114        #[allow(clippy::absurd_extreme_comparisons)]
8115        #[allow(unused_comparisons)]
8116        if __tmp.remaining() < Self::ENCODED_LEN {
8117            panic!(
8118                "buffer is too small (need {} bytes, but got {})",
8119                Self::ENCODED_LEN,
8120                __tmp.remaining(),
8121            )
8122        }
8123        __tmp.put_u32_le(self.id);
8124        __tmp.put_u8(self.target_system);
8125        __tmp.put_u8(self.target_component);
8126        __tmp.put_u8(self.bus);
8127        __tmp.put_u8(self.len);
8128        for val in &self.data {
8129            __tmp.put_u8(*val);
8130        }
8131        if matches!(version, MavlinkVersion::V2) {
8132            let len = __tmp.len();
8133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8134        } else {
8135            __tmp.len()
8136        }
8137    }
8138}
8139#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8140#[doc = ""]
8141#[doc = "ID: 388"]
8142#[derive(Debug, Clone, PartialEq)]
8143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8145#[cfg_attr(feature = "ts", derive(TS))]
8146#[cfg_attr(feature = "ts", ts(export))]
8147pub struct CAN_FILTER_MODIFY_DATA {
8148    #[doc = "filter IDs, length num_ids"]
8149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8151    pub ids: [u16; 16],
8152    #[doc = "System ID."]
8153    pub target_system: u8,
8154    #[doc = "Component ID."]
8155    pub target_component: u8,
8156    #[doc = "bus number"]
8157    pub bus: u8,
8158    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8159    pub operation: CanFilterOp,
8160    #[doc = "number of IDs in filter list"]
8161    pub num_ids: u8,
8162}
8163impl CAN_FILTER_MODIFY_DATA {
8164    pub const ENCODED_LEN: usize = 37usize;
8165    pub const DEFAULT: Self = Self {
8166        ids: [0_u16; 16usize],
8167        target_system: 0_u8,
8168        target_component: 0_u8,
8169        bus: 0_u8,
8170        operation: CanFilterOp::DEFAULT,
8171        num_ids: 0_u8,
8172    };
8173    #[cfg(feature = "arbitrary")]
8174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8175        use arbitrary::{Arbitrary, Unstructured};
8176        let mut buf = [0u8; 1024];
8177        rng.fill_bytes(&mut buf);
8178        let mut unstructured = Unstructured::new(&buf);
8179        Self::arbitrary(&mut unstructured).unwrap_or_default()
8180    }
8181}
8182impl Default for CAN_FILTER_MODIFY_DATA {
8183    fn default() -> Self {
8184        Self::DEFAULT.clone()
8185    }
8186}
8187impl MessageData for CAN_FILTER_MODIFY_DATA {
8188    type Message = MavMessage;
8189    const ID: u32 = 388u32;
8190    const NAME: &'static str = "CAN_FILTER_MODIFY";
8191    const EXTRA_CRC: u8 = 8u8;
8192    const ENCODED_LEN: usize = 37usize;
8193    fn deser(
8194        _version: MavlinkVersion,
8195        __input: &[u8],
8196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8197        let avail_len = __input.len();
8198        let mut payload_buf = [0; Self::ENCODED_LEN];
8199        let mut buf = if avail_len < Self::ENCODED_LEN {
8200            payload_buf[0..avail_len].copy_from_slice(__input);
8201            Bytes::new(&payload_buf)
8202        } else {
8203            Bytes::new(__input)
8204        };
8205        let mut __struct = Self::default();
8206        for v in &mut __struct.ids {
8207            let val = buf.get_u16_le();
8208            *v = val;
8209        }
8210        __struct.target_system = buf.get_u8();
8211        __struct.target_component = buf.get_u8();
8212        __struct.bus = buf.get_u8();
8213        let tmp = buf.get_u8();
8214        __struct.operation =
8215            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8216                enum_type: "CanFilterOp",
8217                value: tmp as u32,
8218            })?;
8219        __struct.num_ids = buf.get_u8();
8220        Ok(__struct)
8221    }
8222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8223        let mut __tmp = BytesMut::new(bytes);
8224        #[allow(clippy::absurd_extreme_comparisons)]
8225        #[allow(unused_comparisons)]
8226        if __tmp.remaining() < Self::ENCODED_LEN {
8227            panic!(
8228                "buffer is too small (need {} bytes, but got {})",
8229                Self::ENCODED_LEN,
8230                __tmp.remaining(),
8231            )
8232        }
8233        for val in &self.ids {
8234            __tmp.put_u16_le(*val);
8235        }
8236        __tmp.put_u8(self.target_system);
8237        __tmp.put_u8(self.target_component);
8238        __tmp.put_u8(self.bus);
8239        __tmp.put_u8(self.operation as u8);
8240        __tmp.put_u8(self.num_ids);
8241        if matches!(version, MavlinkVersion::V2) {
8242            let len = __tmp.len();
8243            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8244        } else {
8245            __tmp.len()
8246        }
8247    }
8248}
8249#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8250#[doc = ""]
8251#[doc = "ID: 386"]
8252#[derive(Debug, Clone, PartialEq)]
8253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8255#[cfg_attr(feature = "ts", derive(TS))]
8256#[cfg_attr(feature = "ts", ts(export))]
8257pub struct CAN_FRAME_DATA {
8258    #[doc = "Frame ID"]
8259    pub id: u32,
8260    #[doc = "System ID."]
8261    pub target_system: u8,
8262    #[doc = "Component ID."]
8263    pub target_component: u8,
8264    #[doc = "Bus number"]
8265    pub bus: u8,
8266    #[doc = "Frame length"]
8267    pub len: u8,
8268    #[doc = "Frame data"]
8269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8270    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8271    pub data: [u8; 8],
8272}
8273impl CAN_FRAME_DATA {
8274    pub const ENCODED_LEN: usize = 16usize;
8275    pub const DEFAULT: Self = Self {
8276        id: 0_u32,
8277        target_system: 0_u8,
8278        target_component: 0_u8,
8279        bus: 0_u8,
8280        len: 0_u8,
8281        data: [0_u8; 8usize],
8282    };
8283    #[cfg(feature = "arbitrary")]
8284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8285        use arbitrary::{Arbitrary, Unstructured};
8286        let mut buf = [0u8; 1024];
8287        rng.fill_bytes(&mut buf);
8288        let mut unstructured = Unstructured::new(&buf);
8289        Self::arbitrary(&mut unstructured).unwrap_or_default()
8290    }
8291}
8292impl Default for CAN_FRAME_DATA {
8293    fn default() -> Self {
8294        Self::DEFAULT.clone()
8295    }
8296}
8297impl MessageData for CAN_FRAME_DATA {
8298    type Message = MavMessage;
8299    const ID: u32 = 386u32;
8300    const NAME: &'static str = "CAN_FRAME";
8301    const EXTRA_CRC: u8 = 132u8;
8302    const ENCODED_LEN: usize = 16usize;
8303    fn deser(
8304        _version: MavlinkVersion,
8305        __input: &[u8],
8306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8307        let avail_len = __input.len();
8308        let mut payload_buf = [0; Self::ENCODED_LEN];
8309        let mut buf = if avail_len < Self::ENCODED_LEN {
8310            payload_buf[0..avail_len].copy_from_slice(__input);
8311            Bytes::new(&payload_buf)
8312        } else {
8313            Bytes::new(__input)
8314        };
8315        let mut __struct = Self::default();
8316        __struct.id = buf.get_u32_le();
8317        __struct.target_system = buf.get_u8();
8318        __struct.target_component = buf.get_u8();
8319        __struct.bus = buf.get_u8();
8320        __struct.len = buf.get_u8();
8321        for v in &mut __struct.data {
8322            let val = buf.get_u8();
8323            *v = val;
8324        }
8325        Ok(__struct)
8326    }
8327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8328        let mut __tmp = BytesMut::new(bytes);
8329        #[allow(clippy::absurd_extreme_comparisons)]
8330        #[allow(unused_comparisons)]
8331        if __tmp.remaining() < Self::ENCODED_LEN {
8332            panic!(
8333                "buffer is too small (need {} bytes, but got {})",
8334                Self::ENCODED_LEN,
8335                __tmp.remaining(),
8336            )
8337        }
8338        __tmp.put_u32_le(self.id);
8339        __tmp.put_u8(self.target_system);
8340        __tmp.put_u8(self.target_component);
8341        __tmp.put_u8(self.bus);
8342        __tmp.put_u8(self.len);
8343        for val in &self.data {
8344            __tmp.put_u8(*val);
8345        }
8346        if matches!(version, MavlinkVersion::V2) {
8347            let len = __tmp.len();
8348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8349        } else {
8350            __tmp.len()
8351        }
8352    }
8353}
8354#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8355#[doc = ""]
8356#[doc = "ID: 336"]
8357#[derive(Debug, Clone, PartialEq)]
8358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8360#[cfg_attr(feature = "ts", derive(TS))]
8361#[cfg_attr(feature = "ts", ts(export))]
8362pub struct CELLULAR_CONFIG_DATA {
8363    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8364    pub enable_lte: u8,
8365    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8366    pub enable_pin: u8,
8367    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8369    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8370    pub pin: [u8; 16],
8371    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8373    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8374    pub new_pin: [u8; 16],
8375    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8377    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8378    pub apn: [u8; 32],
8379    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8381    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8382    pub puk: [u8; 16],
8383    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8384    pub roaming: u8,
8385    #[doc = "Message acceptance response (sent back to GS)."]
8386    pub response: CellularConfigResponse,
8387}
8388impl CELLULAR_CONFIG_DATA {
8389    pub const ENCODED_LEN: usize = 84usize;
8390    pub const DEFAULT: Self = Self {
8391        enable_lte: 0_u8,
8392        enable_pin: 0_u8,
8393        pin: [0_u8; 16usize],
8394        new_pin: [0_u8; 16usize],
8395        apn: [0_u8; 32usize],
8396        puk: [0_u8; 16usize],
8397        roaming: 0_u8,
8398        response: CellularConfigResponse::DEFAULT,
8399    };
8400    #[cfg(feature = "arbitrary")]
8401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8402        use arbitrary::{Arbitrary, Unstructured};
8403        let mut buf = [0u8; 1024];
8404        rng.fill_bytes(&mut buf);
8405        let mut unstructured = Unstructured::new(&buf);
8406        Self::arbitrary(&mut unstructured).unwrap_or_default()
8407    }
8408}
8409impl Default for CELLULAR_CONFIG_DATA {
8410    fn default() -> Self {
8411        Self::DEFAULT.clone()
8412    }
8413}
8414impl MessageData for CELLULAR_CONFIG_DATA {
8415    type Message = MavMessage;
8416    const ID: u32 = 336u32;
8417    const NAME: &'static str = "CELLULAR_CONFIG";
8418    const EXTRA_CRC: u8 = 245u8;
8419    const ENCODED_LEN: usize = 84usize;
8420    fn deser(
8421        _version: MavlinkVersion,
8422        __input: &[u8],
8423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8424        let avail_len = __input.len();
8425        let mut payload_buf = [0; Self::ENCODED_LEN];
8426        let mut buf = if avail_len < Self::ENCODED_LEN {
8427            payload_buf[0..avail_len].copy_from_slice(__input);
8428            Bytes::new(&payload_buf)
8429        } else {
8430            Bytes::new(__input)
8431        };
8432        let mut __struct = Self::default();
8433        __struct.enable_lte = buf.get_u8();
8434        __struct.enable_pin = buf.get_u8();
8435        for v in &mut __struct.pin {
8436            let val = buf.get_u8();
8437            *v = val;
8438        }
8439        for v in &mut __struct.new_pin {
8440            let val = buf.get_u8();
8441            *v = val;
8442        }
8443        for v in &mut __struct.apn {
8444            let val = buf.get_u8();
8445            *v = val;
8446        }
8447        for v in &mut __struct.puk {
8448            let val = buf.get_u8();
8449            *v = val;
8450        }
8451        __struct.roaming = buf.get_u8();
8452        let tmp = buf.get_u8();
8453        __struct.response =
8454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8455                enum_type: "CellularConfigResponse",
8456                value: tmp as u32,
8457            })?;
8458        Ok(__struct)
8459    }
8460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8461        let mut __tmp = BytesMut::new(bytes);
8462        #[allow(clippy::absurd_extreme_comparisons)]
8463        #[allow(unused_comparisons)]
8464        if __tmp.remaining() < Self::ENCODED_LEN {
8465            panic!(
8466                "buffer is too small (need {} bytes, but got {})",
8467                Self::ENCODED_LEN,
8468                __tmp.remaining(),
8469            )
8470        }
8471        __tmp.put_u8(self.enable_lte);
8472        __tmp.put_u8(self.enable_pin);
8473        for val in &self.pin {
8474            __tmp.put_u8(*val);
8475        }
8476        for val in &self.new_pin {
8477            __tmp.put_u8(*val);
8478        }
8479        for val in &self.apn {
8480            __tmp.put_u8(*val);
8481        }
8482        for val in &self.puk {
8483            __tmp.put_u8(*val);
8484        }
8485        __tmp.put_u8(self.roaming);
8486        __tmp.put_u8(self.response as u8);
8487        if matches!(version, MavlinkVersion::V2) {
8488            let len = __tmp.len();
8489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8490        } else {
8491            __tmp.len()
8492        }
8493    }
8494}
8495#[doc = "Report current used cellular network status."]
8496#[doc = ""]
8497#[doc = "ID: 334"]
8498#[derive(Debug, Clone, PartialEq)]
8499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8501#[cfg_attr(feature = "ts", derive(TS))]
8502#[cfg_attr(feature = "ts", ts(export))]
8503pub struct CELLULAR_STATUS_DATA {
8504    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8505    pub mcc: u16,
8506    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8507    pub mnc: u16,
8508    #[doc = "Location area code. If unknown, set to 0"]
8509    pub lac: u16,
8510    #[doc = "Cellular modem status"]
8511    pub status: CellularStatusFlag,
8512    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8513    pub failure_reason: CellularNetworkFailedReason,
8514    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8515    pub mavtype: CellularNetworkRadioType,
8516    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8517    pub quality: u8,
8518}
8519impl CELLULAR_STATUS_DATA {
8520    pub const ENCODED_LEN: usize = 10usize;
8521    pub const DEFAULT: Self = Self {
8522        mcc: 0_u16,
8523        mnc: 0_u16,
8524        lac: 0_u16,
8525        status: CellularStatusFlag::DEFAULT,
8526        failure_reason: CellularNetworkFailedReason::DEFAULT,
8527        mavtype: CellularNetworkRadioType::DEFAULT,
8528        quality: 0_u8,
8529    };
8530    #[cfg(feature = "arbitrary")]
8531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8532        use arbitrary::{Arbitrary, Unstructured};
8533        let mut buf = [0u8; 1024];
8534        rng.fill_bytes(&mut buf);
8535        let mut unstructured = Unstructured::new(&buf);
8536        Self::arbitrary(&mut unstructured).unwrap_or_default()
8537    }
8538}
8539impl Default for CELLULAR_STATUS_DATA {
8540    fn default() -> Self {
8541        Self::DEFAULT.clone()
8542    }
8543}
8544impl MessageData for CELLULAR_STATUS_DATA {
8545    type Message = MavMessage;
8546    const ID: u32 = 334u32;
8547    const NAME: &'static str = "CELLULAR_STATUS";
8548    const EXTRA_CRC: u8 = 72u8;
8549    const ENCODED_LEN: usize = 10usize;
8550    fn deser(
8551        _version: MavlinkVersion,
8552        __input: &[u8],
8553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8554        let avail_len = __input.len();
8555        let mut payload_buf = [0; Self::ENCODED_LEN];
8556        let mut buf = if avail_len < Self::ENCODED_LEN {
8557            payload_buf[0..avail_len].copy_from_slice(__input);
8558            Bytes::new(&payload_buf)
8559        } else {
8560            Bytes::new(__input)
8561        };
8562        let mut __struct = Self::default();
8563        __struct.mcc = buf.get_u16_le();
8564        __struct.mnc = buf.get_u16_le();
8565        __struct.lac = buf.get_u16_le();
8566        let tmp = buf.get_u8();
8567        __struct.status =
8568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8569                enum_type: "CellularStatusFlag",
8570                value: tmp as u32,
8571            })?;
8572        let tmp = buf.get_u8();
8573        __struct.failure_reason =
8574            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8575                enum_type: "CellularNetworkFailedReason",
8576                value: tmp as u32,
8577            })?;
8578        let tmp = buf.get_u8();
8579        __struct.mavtype =
8580            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8581                enum_type: "CellularNetworkRadioType",
8582                value: tmp as u32,
8583            })?;
8584        __struct.quality = buf.get_u8();
8585        Ok(__struct)
8586    }
8587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8588        let mut __tmp = BytesMut::new(bytes);
8589        #[allow(clippy::absurd_extreme_comparisons)]
8590        #[allow(unused_comparisons)]
8591        if __tmp.remaining() < Self::ENCODED_LEN {
8592            panic!(
8593                "buffer is too small (need {} bytes, but got {})",
8594                Self::ENCODED_LEN,
8595                __tmp.remaining(),
8596            )
8597        }
8598        __tmp.put_u16_le(self.mcc);
8599        __tmp.put_u16_le(self.mnc);
8600        __tmp.put_u16_le(self.lac);
8601        __tmp.put_u8(self.status as u8);
8602        __tmp.put_u8(self.failure_reason as u8);
8603        __tmp.put_u8(self.mavtype as u8);
8604        __tmp.put_u8(self.quality);
8605        if matches!(version, MavlinkVersion::V2) {
8606            let len = __tmp.len();
8607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8608        } else {
8609            __tmp.len()
8610        }
8611    }
8612}
8613#[doc = "Request to control this MAV."]
8614#[doc = ""]
8615#[doc = "ID: 5"]
8616#[derive(Debug, Clone, PartialEq)]
8617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8619#[cfg_attr(feature = "ts", derive(TS))]
8620#[cfg_attr(feature = "ts", ts(export))]
8621pub struct CHANGE_OPERATOR_CONTROL_DATA {
8622    #[doc = "System the GCS requests control for"]
8623    pub target_system: u8,
8624    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8625    pub control_request: u8,
8626    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8627    pub version: u8,
8628    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8629    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8630    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8631    pub passkey: [u8; 25],
8632}
8633impl CHANGE_OPERATOR_CONTROL_DATA {
8634    pub const ENCODED_LEN: usize = 28usize;
8635    pub const DEFAULT: Self = Self {
8636        target_system: 0_u8,
8637        control_request: 0_u8,
8638        version: 0_u8,
8639        passkey: [0_u8; 25usize],
8640    };
8641    #[cfg(feature = "arbitrary")]
8642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8643        use arbitrary::{Arbitrary, Unstructured};
8644        let mut buf = [0u8; 1024];
8645        rng.fill_bytes(&mut buf);
8646        let mut unstructured = Unstructured::new(&buf);
8647        Self::arbitrary(&mut unstructured).unwrap_or_default()
8648    }
8649}
8650impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8651    fn default() -> Self {
8652        Self::DEFAULT.clone()
8653    }
8654}
8655impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8656    type Message = MavMessage;
8657    const ID: u32 = 5u32;
8658    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8659    const EXTRA_CRC: u8 = 217u8;
8660    const ENCODED_LEN: usize = 28usize;
8661    fn deser(
8662        _version: MavlinkVersion,
8663        __input: &[u8],
8664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8665        let avail_len = __input.len();
8666        let mut payload_buf = [0; Self::ENCODED_LEN];
8667        let mut buf = if avail_len < Self::ENCODED_LEN {
8668            payload_buf[0..avail_len].copy_from_slice(__input);
8669            Bytes::new(&payload_buf)
8670        } else {
8671            Bytes::new(__input)
8672        };
8673        let mut __struct = Self::default();
8674        __struct.target_system = buf.get_u8();
8675        __struct.control_request = buf.get_u8();
8676        __struct.version = buf.get_u8();
8677        for v in &mut __struct.passkey {
8678            let val = buf.get_u8();
8679            *v = val;
8680        }
8681        Ok(__struct)
8682    }
8683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8684        let mut __tmp = BytesMut::new(bytes);
8685        #[allow(clippy::absurd_extreme_comparisons)]
8686        #[allow(unused_comparisons)]
8687        if __tmp.remaining() < Self::ENCODED_LEN {
8688            panic!(
8689                "buffer is too small (need {} bytes, but got {})",
8690                Self::ENCODED_LEN,
8691                __tmp.remaining(),
8692            )
8693        }
8694        __tmp.put_u8(self.target_system);
8695        __tmp.put_u8(self.control_request);
8696        __tmp.put_u8(self.version);
8697        for val in &self.passkey {
8698            __tmp.put_u8(*val);
8699        }
8700        if matches!(version, MavlinkVersion::V2) {
8701            let len = __tmp.len();
8702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8703        } else {
8704            __tmp.len()
8705        }
8706    }
8707}
8708#[doc = "Accept / deny control of this MAV."]
8709#[doc = ""]
8710#[doc = "ID: 6"]
8711#[derive(Debug, Clone, PartialEq)]
8712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8714#[cfg_attr(feature = "ts", derive(TS))]
8715#[cfg_attr(feature = "ts", ts(export))]
8716pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8717    #[doc = "ID of the GCS this message"]
8718    pub gcs_system_id: u8,
8719    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8720    pub control_request: u8,
8721    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8722    pub ack: u8,
8723}
8724impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8725    pub const ENCODED_LEN: usize = 3usize;
8726    pub const DEFAULT: Self = Self {
8727        gcs_system_id: 0_u8,
8728        control_request: 0_u8,
8729        ack: 0_u8,
8730    };
8731    #[cfg(feature = "arbitrary")]
8732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8733        use arbitrary::{Arbitrary, Unstructured};
8734        let mut buf = [0u8; 1024];
8735        rng.fill_bytes(&mut buf);
8736        let mut unstructured = Unstructured::new(&buf);
8737        Self::arbitrary(&mut unstructured).unwrap_or_default()
8738    }
8739}
8740impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8741    fn default() -> Self {
8742        Self::DEFAULT.clone()
8743    }
8744}
8745impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8746    type Message = MavMessage;
8747    const ID: u32 = 6u32;
8748    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8749    const EXTRA_CRC: u8 = 104u8;
8750    const ENCODED_LEN: usize = 3usize;
8751    fn deser(
8752        _version: MavlinkVersion,
8753        __input: &[u8],
8754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8755        let avail_len = __input.len();
8756        let mut payload_buf = [0; Self::ENCODED_LEN];
8757        let mut buf = if avail_len < Self::ENCODED_LEN {
8758            payload_buf[0..avail_len].copy_from_slice(__input);
8759            Bytes::new(&payload_buf)
8760        } else {
8761            Bytes::new(__input)
8762        };
8763        let mut __struct = Self::default();
8764        __struct.gcs_system_id = buf.get_u8();
8765        __struct.control_request = buf.get_u8();
8766        __struct.ack = buf.get_u8();
8767        Ok(__struct)
8768    }
8769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8770        let mut __tmp = BytesMut::new(bytes);
8771        #[allow(clippy::absurd_extreme_comparisons)]
8772        #[allow(unused_comparisons)]
8773        if __tmp.remaining() < Self::ENCODED_LEN {
8774            panic!(
8775                "buffer is too small (need {} bytes, but got {})",
8776                Self::ENCODED_LEN,
8777                __tmp.remaining(),
8778            )
8779        }
8780        __tmp.put_u8(self.gcs_system_id);
8781        __tmp.put_u8(self.control_request);
8782        __tmp.put_u8(self.ack);
8783        if matches!(version, MavlinkVersion::V2) {
8784            let len = __tmp.len();
8785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8786        } else {
8787            __tmp.len()
8788        }
8789    }
8790}
8791#[doc = "Information about a potential collision."]
8792#[doc = ""]
8793#[doc = "ID: 247"]
8794#[derive(Debug, Clone, PartialEq)]
8795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8797#[cfg_attr(feature = "ts", derive(TS))]
8798#[cfg_attr(feature = "ts", ts(export))]
8799pub struct COLLISION_DATA {
8800    #[doc = "Unique identifier, domain based on src field"]
8801    pub id: u32,
8802    #[doc = "Estimated time until collision occurs"]
8803    pub time_to_minimum_delta: f32,
8804    #[doc = "Closest vertical distance between vehicle and object"]
8805    pub altitude_minimum_delta: f32,
8806    #[doc = "Closest horizontal distance between vehicle and object"]
8807    pub horizontal_minimum_delta: f32,
8808    #[doc = "Collision data source"]
8809    pub src: MavCollisionSrc,
8810    #[doc = "Action that is being taken to avoid this collision"]
8811    pub action: MavCollisionAction,
8812    #[doc = "How concerned the aircraft is about this collision"]
8813    pub threat_level: MavCollisionThreatLevel,
8814}
8815impl COLLISION_DATA {
8816    pub const ENCODED_LEN: usize = 19usize;
8817    pub const DEFAULT: Self = Self {
8818        id: 0_u32,
8819        time_to_minimum_delta: 0.0_f32,
8820        altitude_minimum_delta: 0.0_f32,
8821        horizontal_minimum_delta: 0.0_f32,
8822        src: MavCollisionSrc::DEFAULT,
8823        action: MavCollisionAction::DEFAULT,
8824        threat_level: MavCollisionThreatLevel::DEFAULT,
8825    };
8826    #[cfg(feature = "arbitrary")]
8827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8828        use arbitrary::{Arbitrary, Unstructured};
8829        let mut buf = [0u8; 1024];
8830        rng.fill_bytes(&mut buf);
8831        let mut unstructured = Unstructured::new(&buf);
8832        Self::arbitrary(&mut unstructured).unwrap_or_default()
8833    }
8834}
8835impl Default for COLLISION_DATA {
8836    fn default() -> Self {
8837        Self::DEFAULT.clone()
8838    }
8839}
8840impl MessageData for COLLISION_DATA {
8841    type Message = MavMessage;
8842    const ID: u32 = 247u32;
8843    const NAME: &'static str = "COLLISION";
8844    const EXTRA_CRC: u8 = 81u8;
8845    const ENCODED_LEN: usize = 19usize;
8846    fn deser(
8847        _version: MavlinkVersion,
8848        __input: &[u8],
8849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8850        let avail_len = __input.len();
8851        let mut payload_buf = [0; Self::ENCODED_LEN];
8852        let mut buf = if avail_len < Self::ENCODED_LEN {
8853            payload_buf[0..avail_len].copy_from_slice(__input);
8854            Bytes::new(&payload_buf)
8855        } else {
8856            Bytes::new(__input)
8857        };
8858        let mut __struct = Self::default();
8859        __struct.id = buf.get_u32_le();
8860        __struct.time_to_minimum_delta = buf.get_f32_le();
8861        __struct.altitude_minimum_delta = buf.get_f32_le();
8862        __struct.horizontal_minimum_delta = buf.get_f32_le();
8863        let tmp = buf.get_u8();
8864        __struct.src =
8865            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8866                enum_type: "MavCollisionSrc",
8867                value: tmp as u32,
8868            })?;
8869        let tmp = buf.get_u8();
8870        __struct.action =
8871            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8872                enum_type: "MavCollisionAction",
8873                value: tmp as u32,
8874            })?;
8875        let tmp = buf.get_u8();
8876        __struct.threat_level =
8877            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8878                enum_type: "MavCollisionThreatLevel",
8879                value: tmp as u32,
8880            })?;
8881        Ok(__struct)
8882    }
8883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8884        let mut __tmp = BytesMut::new(bytes);
8885        #[allow(clippy::absurd_extreme_comparisons)]
8886        #[allow(unused_comparisons)]
8887        if __tmp.remaining() < Self::ENCODED_LEN {
8888            panic!(
8889                "buffer is too small (need {} bytes, but got {})",
8890                Self::ENCODED_LEN,
8891                __tmp.remaining(),
8892            )
8893        }
8894        __tmp.put_u32_le(self.id);
8895        __tmp.put_f32_le(self.time_to_minimum_delta);
8896        __tmp.put_f32_le(self.altitude_minimum_delta);
8897        __tmp.put_f32_le(self.horizontal_minimum_delta);
8898        __tmp.put_u8(self.src as u8);
8899        __tmp.put_u8(self.action as u8);
8900        __tmp.put_u8(self.threat_level as u8);
8901        if matches!(version, MavlinkVersion::V2) {
8902            let len = __tmp.len();
8903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8904        } else {
8905            __tmp.len()
8906        }
8907    }
8908}
8909#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8910#[doc = ""]
8911#[doc = "ID: 77"]
8912#[derive(Debug, Clone, PartialEq)]
8913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8915#[cfg_attr(feature = "ts", derive(TS))]
8916#[cfg_attr(feature = "ts", ts(export))]
8917pub struct COMMAND_ACK_DATA {
8918    #[doc = "Command ID (of acknowledged command)."]
8919    pub command: MavCmd,
8920    #[doc = "Result of command."]
8921    pub result: MavResult,
8922    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8923    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8924    pub progress: u8,
8925    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8927    pub result_param2: i32,
8928    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8930    pub target_system: u8,
8931    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8933    pub target_component: u8,
8934}
8935impl COMMAND_ACK_DATA {
8936    pub const ENCODED_LEN: usize = 10usize;
8937    pub const DEFAULT: Self = Self {
8938        command: MavCmd::DEFAULT,
8939        result: MavResult::DEFAULT,
8940        progress: 0_u8,
8941        result_param2: 0_i32,
8942        target_system: 0_u8,
8943        target_component: 0_u8,
8944    };
8945    #[cfg(feature = "arbitrary")]
8946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8947        use arbitrary::{Arbitrary, Unstructured};
8948        let mut buf = [0u8; 1024];
8949        rng.fill_bytes(&mut buf);
8950        let mut unstructured = Unstructured::new(&buf);
8951        Self::arbitrary(&mut unstructured).unwrap_or_default()
8952    }
8953}
8954impl Default for COMMAND_ACK_DATA {
8955    fn default() -> Self {
8956        Self::DEFAULT.clone()
8957    }
8958}
8959impl MessageData for COMMAND_ACK_DATA {
8960    type Message = MavMessage;
8961    const ID: u32 = 77u32;
8962    const NAME: &'static str = "COMMAND_ACK";
8963    const EXTRA_CRC: u8 = 143u8;
8964    const ENCODED_LEN: usize = 10usize;
8965    fn deser(
8966        _version: MavlinkVersion,
8967        __input: &[u8],
8968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8969        let avail_len = __input.len();
8970        let mut payload_buf = [0; Self::ENCODED_LEN];
8971        let mut buf = if avail_len < Self::ENCODED_LEN {
8972            payload_buf[0..avail_len].copy_from_slice(__input);
8973            Bytes::new(&payload_buf)
8974        } else {
8975            Bytes::new(__input)
8976        };
8977        let mut __struct = Self::default();
8978        let tmp = buf.get_u16_le();
8979        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8980            ::mavlink_core::error::ParserError::InvalidEnum {
8981                enum_type: "MavCmd",
8982                value: tmp as u32,
8983            },
8984        )?;
8985        let tmp = buf.get_u8();
8986        __struct.result =
8987            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8988                enum_type: "MavResult",
8989                value: tmp as u32,
8990            })?;
8991        __struct.progress = buf.get_u8();
8992        __struct.result_param2 = buf.get_i32_le();
8993        __struct.target_system = buf.get_u8();
8994        __struct.target_component = buf.get_u8();
8995        Ok(__struct)
8996    }
8997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8998        let mut __tmp = BytesMut::new(bytes);
8999        #[allow(clippy::absurd_extreme_comparisons)]
9000        #[allow(unused_comparisons)]
9001        if __tmp.remaining() < Self::ENCODED_LEN {
9002            panic!(
9003                "buffer is too small (need {} bytes, but got {})",
9004                Self::ENCODED_LEN,
9005                __tmp.remaining(),
9006            )
9007        }
9008        __tmp.put_u16_le(self.command as u16);
9009        __tmp.put_u8(self.result as u8);
9010        if matches!(version, MavlinkVersion::V2) {
9011            __tmp.put_u8(self.progress);
9012            __tmp.put_i32_le(self.result_param2);
9013            __tmp.put_u8(self.target_system);
9014            __tmp.put_u8(self.target_component);
9015            let len = __tmp.len();
9016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9017        } else {
9018            __tmp.len()
9019        }
9020    }
9021}
9022#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9023#[doc = ""]
9024#[doc = "ID: 80"]
9025#[derive(Debug, Clone, PartialEq)]
9026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9028#[cfg_attr(feature = "ts", derive(TS))]
9029#[cfg_attr(feature = "ts", ts(export))]
9030pub struct COMMAND_CANCEL_DATA {
9031    #[doc = "Command ID (of command to cancel)."]
9032    pub command: MavCmd,
9033    #[doc = "System executing long running command. Should not be broadcast (0)."]
9034    pub target_system: u8,
9035    #[doc = "Component executing long running command."]
9036    pub target_component: u8,
9037}
9038impl COMMAND_CANCEL_DATA {
9039    pub const ENCODED_LEN: usize = 4usize;
9040    pub const DEFAULT: Self = Self {
9041        command: MavCmd::DEFAULT,
9042        target_system: 0_u8,
9043        target_component: 0_u8,
9044    };
9045    #[cfg(feature = "arbitrary")]
9046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9047        use arbitrary::{Arbitrary, Unstructured};
9048        let mut buf = [0u8; 1024];
9049        rng.fill_bytes(&mut buf);
9050        let mut unstructured = Unstructured::new(&buf);
9051        Self::arbitrary(&mut unstructured).unwrap_or_default()
9052    }
9053}
9054impl Default for COMMAND_CANCEL_DATA {
9055    fn default() -> Self {
9056        Self::DEFAULT.clone()
9057    }
9058}
9059impl MessageData for COMMAND_CANCEL_DATA {
9060    type Message = MavMessage;
9061    const ID: u32 = 80u32;
9062    const NAME: &'static str = "COMMAND_CANCEL";
9063    const EXTRA_CRC: u8 = 14u8;
9064    const ENCODED_LEN: usize = 4usize;
9065    fn deser(
9066        _version: MavlinkVersion,
9067        __input: &[u8],
9068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9069        let avail_len = __input.len();
9070        let mut payload_buf = [0; Self::ENCODED_LEN];
9071        let mut buf = if avail_len < Self::ENCODED_LEN {
9072            payload_buf[0..avail_len].copy_from_slice(__input);
9073            Bytes::new(&payload_buf)
9074        } else {
9075            Bytes::new(__input)
9076        };
9077        let mut __struct = Self::default();
9078        let tmp = buf.get_u16_le();
9079        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9080            ::mavlink_core::error::ParserError::InvalidEnum {
9081                enum_type: "MavCmd",
9082                value: tmp as u32,
9083            },
9084        )?;
9085        __struct.target_system = buf.get_u8();
9086        __struct.target_component = buf.get_u8();
9087        Ok(__struct)
9088    }
9089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9090        let mut __tmp = BytesMut::new(bytes);
9091        #[allow(clippy::absurd_extreme_comparisons)]
9092        #[allow(unused_comparisons)]
9093        if __tmp.remaining() < Self::ENCODED_LEN {
9094            panic!(
9095                "buffer is too small (need {} bytes, but got {})",
9096                Self::ENCODED_LEN,
9097                __tmp.remaining(),
9098            )
9099        }
9100        __tmp.put_u16_le(self.command as u16);
9101        __tmp.put_u8(self.target_system);
9102        __tmp.put_u8(self.target_component);
9103        if matches!(version, MavlinkVersion::V2) {
9104            let len = __tmp.len();
9105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9106        } else {
9107            __tmp.len()
9108        }
9109    }
9110}
9111#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9112#[doc = ""]
9113#[doc = "ID: 75"]
9114#[derive(Debug, Clone, PartialEq)]
9115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9117#[cfg_attr(feature = "ts", derive(TS))]
9118#[cfg_attr(feature = "ts", ts(export))]
9119pub struct COMMAND_INT_DATA {
9120    #[doc = "PARAM1, see MAV_CMD enum"]
9121    pub param1: f32,
9122    #[doc = "PARAM2, see MAV_CMD enum"]
9123    pub param2: f32,
9124    #[doc = "PARAM3, see MAV_CMD enum"]
9125    pub param3: f32,
9126    #[doc = "PARAM4, see MAV_CMD enum"]
9127    pub param4: f32,
9128    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9129    pub x: i32,
9130    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9131    pub y: i32,
9132    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9133    pub z: f32,
9134    #[doc = "The scheduled action for the mission item."]
9135    pub command: MavCmd,
9136    #[doc = "System ID"]
9137    pub target_system: u8,
9138    #[doc = "Component ID"]
9139    pub target_component: u8,
9140    #[doc = "The coordinate system of the COMMAND."]
9141    pub frame: MavFrame,
9142    #[doc = "Not used."]
9143    pub current: u8,
9144    #[doc = "Not used (set 0)."]
9145    pub autocontinue: u8,
9146}
9147impl COMMAND_INT_DATA {
9148    pub const ENCODED_LEN: usize = 35usize;
9149    pub const DEFAULT: Self = Self {
9150        param1: 0.0_f32,
9151        param2: 0.0_f32,
9152        param3: 0.0_f32,
9153        param4: 0.0_f32,
9154        x: 0_i32,
9155        y: 0_i32,
9156        z: 0.0_f32,
9157        command: MavCmd::DEFAULT,
9158        target_system: 0_u8,
9159        target_component: 0_u8,
9160        frame: MavFrame::DEFAULT,
9161        current: 0_u8,
9162        autocontinue: 0_u8,
9163    };
9164    #[cfg(feature = "arbitrary")]
9165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9166        use arbitrary::{Arbitrary, Unstructured};
9167        let mut buf = [0u8; 1024];
9168        rng.fill_bytes(&mut buf);
9169        let mut unstructured = Unstructured::new(&buf);
9170        Self::arbitrary(&mut unstructured).unwrap_or_default()
9171    }
9172}
9173impl Default for COMMAND_INT_DATA {
9174    fn default() -> Self {
9175        Self::DEFAULT.clone()
9176    }
9177}
9178impl MessageData for COMMAND_INT_DATA {
9179    type Message = MavMessage;
9180    const ID: u32 = 75u32;
9181    const NAME: &'static str = "COMMAND_INT";
9182    const EXTRA_CRC: u8 = 158u8;
9183    const ENCODED_LEN: usize = 35usize;
9184    fn deser(
9185        _version: MavlinkVersion,
9186        __input: &[u8],
9187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9188        let avail_len = __input.len();
9189        let mut payload_buf = [0; Self::ENCODED_LEN];
9190        let mut buf = if avail_len < Self::ENCODED_LEN {
9191            payload_buf[0..avail_len].copy_from_slice(__input);
9192            Bytes::new(&payload_buf)
9193        } else {
9194            Bytes::new(__input)
9195        };
9196        let mut __struct = Self::default();
9197        __struct.param1 = buf.get_f32_le();
9198        __struct.param2 = buf.get_f32_le();
9199        __struct.param3 = buf.get_f32_le();
9200        __struct.param4 = buf.get_f32_le();
9201        __struct.x = buf.get_i32_le();
9202        __struct.y = buf.get_i32_le();
9203        __struct.z = buf.get_f32_le();
9204        let tmp = buf.get_u16_le();
9205        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9206            ::mavlink_core::error::ParserError::InvalidEnum {
9207                enum_type: "MavCmd",
9208                value: tmp as u32,
9209            },
9210        )?;
9211        __struct.target_system = buf.get_u8();
9212        __struct.target_component = buf.get_u8();
9213        let tmp = buf.get_u8();
9214        __struct.frame =
9215            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9216                enum_type: "MavFrame",
9217                value: tmp as u32,
9218            })?;
9219        __struct.current = buf.get_u8();
9220        __struct.autocontinue = buf.get_u8();
9221        Ok(__struct)
9222    }
9223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9224        let mut __tmp = BytesMut::new(bytes);
9225        #[allow(clippy::absurd_extreme_comparisons)]
9226        #[allow(unused_comparisons)]
9227        if __tmp.remaining() < Self::ENCODED_LEN {
9228            panic!(
9229                "buffer is too small (need {} bytes, but got {})",
9230                Self::ENCODED_LEN,
9231                __tmp.remaining(),
9232            )
9233        }
9234        __tmp.put_f32_le(self.param1);
9235        __tmp.put_f32_le(self.param2);
9236        __tmp.put_f32_le(self.param3);
9237        __tmp.put_f32_le(self.param4);
9238        __tmp.put_i32_le(self.x);
9239        __tmp.put_i32_le(self.y);
9240        __tmp.put_f32_le(self.z);
9241        __tmp.put_u16_le(self.command as u16);
9242        __tmp.put_u8(self.target_system);
9243        __tmp.put_u8(self.target_component);
9244        __tmp.put_u8(self.frame as u8);
9245        __tmp.put_u8(self.current);
9246        __tmp.put_u8(self.autocontinue);
9247        if matches!(version, MavlinkVersion::V2) {
9248            let len = __tmp.len();
9249            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9250        } else {
9251            __tmp.len()
9252        }
9253    }
9254}
9255#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9256#[doc = ""]
9257#[doc = "ID: 76"]
9258#[derive(Debug, Clone, PartialEq)]
9259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9261#[cfg_attr(feature = "ts", derive(TS))]
9262#[cfg_attr(feature = "ts", ts(export))]
9263pub struct COMMAND_LONG_DATA {
9264    #[doc = "Parameter 1 (for the specific command)."]
9265    pub param1: f32,
9266    #[doc = "Parameter 2 (for the specific command)."]
9267    pub param2: f32,
9268    #[doc = "Parameter 3 (for the specific command)."]
9269    pub param3: f32,
9270    #[doc = "Parameter 4 (for the specific command)."]
9271    pub param4: f32,
9272    #[doc = "Parameter 5 (for the specific command)."]
9273    pub param5: f32,
9274    #[doc = "Parameter 6 (for the specific command)."]
9275    pub param6: f32,
9276    #[doc = "Parameter 7 (for the specific command)."]
9277    pub param7: f32,
9278    #[doc = "Command ID (of command to send)."]
9279    pub command: MavCmd,
9280    #[doc = "System which should execute the command"]
9281    pub target_system: u8,
9282    #[doc = "Component which should execute the command, 0 for all components"]
9283    pub target_component: u8,
9284    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9285    pub confirmation: u8,
9286}
9287impl COMMAND_LONG_DATA {
9288    pub const ENCODED_LEN: usize = 33usize;
9289    pub const DEFAULT: Self = Self {
9290        param1: 0.0_f32,
9291        param2: 0.0_f32,
9292        param3: 0.0_f32,
9293        param4: 0.0_f32,
9294        param5: 0.0_f32,
9295        param6: 0.0_f32,
9296        param7: 0.0_f32,
9297        command: MavCmd::DEFAULT,
9298        target_system: 0_u8,
9299        target_component: 0_u8,
9300        confirmation: 0_u8,
9301    };
9302    #[cfg(feature = "arbitrary")]
9303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9304        use arbitrary::{Arbitrary, Unstructured};
9305        let mut buf = [0u8; 1024];
9306        rng.fill_bytes(&mut buf);
9307        let mut unstructured = Unstructured::new(&buf);
9308        Self::arbitrary(&mut unstructured).unwrap_or_default()
9309    }
9310}
9311impl Default for COMMAND_LONG_DATA {
9312    fn default() -> Self {
9313        Self::DEFAULT.clone()
9314    }
9315}
9316impl MessageData for COMMAND_LONG_DATA {
9317    type Message = MavMessage;
9318    const ID: u32 = 76u32;
9319    const NAME: &'static str = "COMMAND_LONG";
9320    const EXTRA_CRC: u8 = 152u8;
9321    const ENCODED_LEN: usize = 33usize;
9322    fn deser(
9323        _version: MavlinkVersion,
9324        __input: &[u8],
9325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9326        let avail_len = __input.len();
9327        let mut payload_buf = [0; Self::ENCODED_LEN];
9328        let mut buf = if avail_len < Self::ENCODED_LEN {
9329            payload_buf[0..avail_len].copy_from_slice(__input);
9330            Bytes::new(&payload_buf)
9331        } else {
9332            Bytes::new(__input)
9333        };
9334        let mut __struct = Self::default();
9335        __struct.param1 = buf.get_f32_le();
9336        __struct.param2 = buf.get_f32_le();
9337        __struct.param3 = buf.get_f32_le();
9338        __struct.param4 = buf.get_f32_le();
9339        __struct.param5 = buf.get_f32_le();
9340        __struct.param6 = buf.get_f32_le();
9341        __struct.param7 = buf.get_f32_le();
9342        let tmp = buf.get_u16_le();
9343        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9344            ::mavlink_core::error::ParserError::InvalidEnum {
9345                enum_type: "MavCmd",
9346                value: tmp as u32,
9347            },
9348        )?;
9349        __struct.target_system = buf.get_u8();
9350        __struct.target_component = buf.get_u8();
9351        __struct.confirmation = buf.get_u8();
9352        Ok(__struct)
9353    }
9354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9355        let mut __tmp = BytesMut::new(bytes);
9356        #[allow(clippy::absurd_extreme_comparisons)]
9357        #[allow(unused_comparisons)]
9358        if __tmp.remaining() < Self::ENCODED_LEN {
9359            panic!(
9360                "buffer is too small (need {} bytes, but got {})",
9361                Self::ENCODED_LEN,
9362                __tmp.remaining(),
9363            )
9364        }
9365        __tmp.put_f32_le(self.param1);
9366        __tmp.put_f32_le(self.param2);
9367        __tmp.put_f32_le(self.param3);
9368        __tmp.put_f32_le(self.param4);
9369        __tmp.put_f32_le(self.param5);
9370        __tmp.put_f32_le(self.param6);
9371        __tmp.put_f32_le(self.param7);
9372        __tmp.put_u16_le(self.command as u16);
9373        __tmp.put_u8(self.target_system);
9374        __tmp.put_u8(self.target_component);
9375        __tmp.put_u8(self.confirmation);
9376        if matches!(version, MavlinkVersion::V2) {
9377            let len = __tmp.len();
9378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9379        } else {
9380            __tmp.len()
9381        }
9382    }
9383}
9384#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9385#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9386#[doc = ""]
9387#[doc = "ID: 395"]
9388#[derive(Debug, Clone, PartialEq)]
9389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9391#[cfg_attr(feature = "ts", derive(TS))]
9392#[cfg_attr(feature = "ts", ts(export))]
9393pub struct COMPONENT_INFORMATION_DATA {
9394    #[doc = "Timestamp (time since system boot)."]
9395    pub time_boot_ms: u32,
9396    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9397    pub general_metadata_file_crc: u32,
9398    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9399    pub peripherals_metadata_file_crc: u32,
9400    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9401    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9402    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9403    pub general_metadata_uri: [u8; 100],
9404    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9406    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9407    pub peripherals_metadata_uri: [u8; 100],
9408}
9409impl COMPONENT_INFORMATION_DATA {
9410    pub const ENCODED_LEN: usize = 212usize;
9411    pub const DEFAULT: Self = Self {
9412        time_boot_ms: 0_u32,
9413        general_metadata_file_crc: 0_u32,
9414        peripherals_metadata_file_crc: 0_u32,
9415        general_metadata_uri: [0_u8; 100usize],
9416        peripherals_metadata_uri: [0_u8; 100usize],
9417    };
9418    #[cfg(feature = "arbitrary")]
9419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9420        use arbitrary::{Arbitrary, Unstructured};
9421        let mut buf = [0u8; 1024];
9422        rng.fill_bytes(&mut buf);
9423        let mut unstructured = Unstructured::new(&buf);
9424        Self::arbitrary(&mut unstructured).unwrap_or_default()
9425    }
9426}
9427impl Default for COMPONENT_INFORMATION_DATA {
9428    fn default() -> Self {
9429        Self::DEFAULT.clone()
9430    }
9431}
9432impl MessageData for COMPONENT_INFORMATION_DATA {
9433    type Message = MavMessage;
9434    const ID: u32 = 395u32;
9435    const NAME: &'static str = "COMPONENT_INFORMATION";
9436    const EXTRA_CRC: u8 = 0u8;
9437    const ENCODED_LEN: usize = 212usize;
9438    fn deser(
9439        _version: MavlinkVersion,
9440        __input: &[u8],
9441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9442        let avail_len = __input.len();
9443        let mut payload_buf = [0; Self::ENCODED_LEN];
9444        let mut buf = if avail_len < Self::ENCODED_LEN {
9445            payload_buf[0..avail_len].copy_from_slice(__input);
9446            Bytes::new(&payload_buf)
9447        } else {
9448            Bytes::new(__input)
9449        };
9450        let mut __struct = Self::default();
9451        __struct.time_boot_ms = buf.get_u32_le();
9452        __struct.general_metadata_file_crc = buf.get_u32_le();
9453        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9454        for v in &mut __struct.general_metadata_uri {
9455            let val = buf.get_u8();
9456            *v = val;
9457        }
9458        for v in &mut __struct.peripherals_metadata_uri {
9459            let val = buf.get_u8();
9460            *v = val;
9461        }
9462        Ok(__struct)
9463    }
9464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9465        let mut __tmp = BytesMut::new(bytes);
9466        #[allow(clippy::absurd_extreme_comparisons)]
9467        #[allow(unused_comparisons)]
9468        if __tmp.remaining() < Self::ENCODED_LEN {
9469            panic!(
9470                "buffer is too small (need {} bytes, but got {})",
9471                Self::ENCODED_LEN,
9472                __tmp.remaining(),
9473            )
9474        }
9475        __tmp.put_u32_le(self.time_boot_ms);
9476        __tmp.put_u32_le(self.general_metadata_file_crc);
9477        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9478        for val in &self.general_metadata_uri {
9479            __tmp.put_u8(*val);
9480        }
9481        for val in &self.peripherals_metadata_uri {
9482            __tmp.put_u8(*val);
9483        }
9484        if matches!(version, MavlinkVersion::V2) {
9485            let len = __tmp.len();
9486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9487        } else {
9488            __tmp.len()
9489        }
9490    }
9491}
9492#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9493#[doc = ""]
9494#[doc = "ID: 396"]
9495#[derive(Debug, Clone, PartialEq)]
9496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9498#[cfg_attr(feature = "ts", derive(TS))]
9499#[cfg_attr(feature = "ts", ts(export))]
9500pub struct COMPONENT_INFORMATION_BASIC_DATA {
9501    #[doc = "Component capability flags"]
9502    pub capabilities: MavProtocolCapability,
9503    #[doc = "Timestamp (time since system boot)."]
9504    pub time_boot_ms: u32,
9505    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9506    pub time_manufacture_s: u32,
9507    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9509    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9510    pub vendor_name: [u8; 32],
9511    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9513    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9514    pub model_name: [u8; 32],
9515    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9516    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9517    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9518    pub software_version: [u8; 24],
9519    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9520    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9521    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9522    pub hardware_version: [u8; 24],
9523    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9525    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9526    pub serial_number: [u8; 32],
9527}
9528impl COMPONENT_INFORMATION_BASIC_DATA {
9529    pub const ENCODED_LEN: usize = 160usize;
9530    pub const DEFAULT: Self = Self {
9531        capabilities: MavProtocolCapability::DEFAULT,
9532        time_boot_ms: 0_u32,
9533        time_manufacture_s: 0_u32,
9534        vendor_name: [0_u8; 32usize],
9535        model_name: [0_u8; 32usize],
9536        software_version: [0_u8; 24usize],
9537        hardware_version: [0_u8; 24usize],
9538        serial_number: [0_u8; 32usize],
9539    };
9540    #[cfg(feature = "arbitrary")]
9541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9542        use arbitrary::{Arbitrary, Unstructured};
9543        let mut buf = [0u8; 1024];
9544        rng.fill_bytes(&mut buf);
9545        let mut unstructured = Unstructured::new(&buf);
9546        Self::arbitrary(&mut unstructured).unwrap_or_default()
9547    }
9548}
9549impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9550    fn default() -> Self {
9551        Self::DEFAULT.clone()
9552    }
9553}
9554impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9555    type Message = MavMessage;
9556    const ID: u32 = 396u32;
9557    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9558    const EXTRA_CRC: u8 = 50u8;
9559    const ENCODED_LEN: usize = 160usize;
9560    fn deser(
9561        _version: MavlinkVersion,
9562        __input: &[u8],
9563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9564        let avail_len = __input.len();
9565        let mut payload_buf = [0; Self::ENCODED_LEN];
9566        let mut buf = if avail_len < Self::ENCODED_LEN {
9567            payload_buf[0..avail_len].copy_from_slice(__input);
9568            Bytes::new(&payload_buf)
9569        } else {
9570            Bytes::new(__input)
9571        };
9572        let mut __struct = Self::default();
9573        let tmp = buf.get_u64_le();
9574        __struct.capabilities = MavProtocolCapability::from_bits(
9575            tmp & MavProtocolCapability::all().bits(),
9576        )
9577        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9578            flag_type: "MavProtocolCapability",
9579            value: tmp as u32,
9580        })?;
9581        __struct.time_boot_ms = buf.get_u32_le();
9582        __struct.time_manufacture_s = buf.get_u32_le();
9583        for v in &mut __struct.vendor_name {
9584            let val = buf.get_u8();
9585            *v = val;
9586        }
9587        for v in &mut __struct.model_name {
9588            let val = buf.get_u8();
9589            *v = val;
9590        }
9591        for v in &mut __struct.software_version {
9592            let val = buf.get_u8();
9593            *v = val;
9594        }
9595        for v in &mut __struct.hardware_version {
9596            let val = buf.get_u8();
9597            *v = val;
9598        }
9599        for v in &mut __struct.serial_number {
9600            let val = buf.get_u8();
9601            *v = val;
9602        }
9603        Ok(__struct)
9604    }
9605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9606        let mut __tmp = BytesMut::new(bytes);
9607        #[allow(clippy::absurd_extreme_comparisons)]
9608        #[allow(unused_comparisons)]
9609        if __tmp.remaining() < Self::ENCODED_LEN {
9610            panic!(
9611                "buffer is too small (need {} bytes, but got {})",
9612                Self::ENCODED_LEN,
9613                __tmp.remaining(),
9614            )
9615        }
9616        __tmp.put_u64_le(self.capabilities.bits());
9617        __tmp.put_u32_le(self.time_boot_ms);
9618        __tmp.put_u32_le(self.time_manufacture_s);
9619        for val in &self.vendor_name {
9620            __tmp.put_u8(*val);
9621        }
9622        for val in &self.model_name {
9623            __tmp.put_u8(*val);
9624        }
9625        for val in &self.software_version {
9626            __tmp.put_u8(*val);
9627        }
9628        for val in &self.hardware_version {
9629            __tmp.put_u8(*val);
9630        }
9631        for val in &self.serial_number {
9632            __tmp.put_u8(*val);
9633        }
9634        if matches!(version, MavlinkVersion::V2) {
9635            let len = __tmp.len();
9636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9637        } else {
9638            __tmp.len()
9639        }
9640    }
9641}
9642#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9643#[doc = ""]
9644#[doc = "ID: 397"]
9645#[derive(Debug, Clone, PartialEq)]
9646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9648#[cfg_attr(feature = "ts", derive(TS))]
9649#[cfg_attr(feature = "ts", ts(export))]
9650pub struct COMPONENT_METADATA_DATA {
9651    #[doc = "Timestamp (time since system boot)."]
9652    pub time_boot_ms: u32,
9653    #[doc = "CRC32 of the general metadata file."]
9654    pub file_crc: u32,
9655    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9656    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9657    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9658    pub uri: [u8; 100],
9659}
9660impl COMPONENT_METADATA_DATA {
9661    pub const ENCODED_LEN: usize = 108usize;
9662    pub const DEFAULT: Self = Self {
9663        time_boot_ms: 0_u32,
9664        file_crc: 0_u32,
9665        uri: [0_u8; 100usize],
9666    };
9667    #[cfg(feature = "arbitrary")]
9668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9669        use arbitrary::{Arbitrary, Unstructured};
9670        let mut buf = [0u8; 1024];
9671        rng.fill_bytes(&mut buf);
9672        let mut unstructured = Unstructured::new(&buf);
9673        Self::arbitrary(&mut unstructured).unwrap_or_default()
9674    }
9675}
9676impl Default for COMPONENT_METADATA_DATA {
9677    fn default() -> Self {
9678        Self::DEFAULT.clone()
9679    }
9680}
9681impl MessageData for COMPONENT_METADATA_DATA {
9682    type Message = MavMessage;
9683    const ID: u32 = 397u32;
9684    const NAME: &'static str = "COMPONENT_METADATA";
9685    const EXTRA_CRC: u8 = 182u8;
9686    const ENCODED_LEN: usize = 108usize;
9687    fn deser(
9688        _version: MavlinkVersion,
9689        __input: &[u8],
9690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9691        let avail_len = __input.len();
9692        let mut payload_buf = [0; Self::ENCODED_LEN];
9693        let mut buf = if avail_len < Self::ENCODED_LEN {
9694            payload_buf[0..avail_len].copy_from_slice(__input);
9695            Bytes::new(&payload_buf)
9696        } else {
9697            Bytes::new(__input)
9698        };
9699        let mut __struct = Self::default();
9700        __struct.time_boot_ms = buf.get_u32_le();
9701        __struct.file_crc = buf.get_u32_le();
9702        for v in &mut __struct.uri {
9703            let val = buf.get_u8();
9704            *v = val;
9705        }
9706        Ok(__struct)
9707    }
9708    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9709        let mut __tmp = BytesMut::new(bytes);
9710        #[allow(clippy::absurd_extreme_comparisons)]
9711        #[allow(unused_comparisons)]
9712        if __tmp.remaining() < Self::ENCODED_LEN {
9713            panic!(
9714                "buffer is too small (need {} bytes, but got {})",
9715                Self::ENCODED_LEN,
9716                __tmp.remaining(),
9717            )
9718        }
9719        __tmp.put_u32_le(self.time_boot_ms);
9720        __tmp.put_u32_le(self.file_crc);
9721        for val in &self.uri {
9722            __tmp.put_u8(*val);
9723        }
9724        if matches!(version, MavlinkVersion::V2) {
9725            let len = __tmp.len();
9726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9727        } else {
9728            __tmp.len()
9729        }
9730    }
9731}
9732#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9733#[doc = ""]
9734#[doc = "ID: 146"]
9735#[derive(Debug, Clone, PartialEq)]
9736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9738#[cfg_attr(feature = "ts", derive(TS))]
9739#[cfg_attr(feature = "ts", ts(export))]
9740pub struct CONTROL_SYSTEM_STATE_DATA {
9741    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9742    pub time_usec: u64,
9743    #[doc = "X acceleration in body frame"]
9744    pub x_acc: f32,
9745    #[doc = "Y acceleration in body frame"]
9746    pub y_acc: f32,
9747    #[doc = "Z acceleration in body frame"]
9748    pub z_acc: f32,
9749    #[doc = "X velocity in body frame"]
9750    pub x_vel: f32,
9751    #[doc = "Y velocity in body frame"]
9752    pub y_vel: f32,
9753    #[doc = "Z velocity in body frame"]
9754    pub z_vel: f32,
9755    #[doc = "X position in local frame"]
9756    pub x_pos: f32,
9757    #[doc = "Y position in local frame"]
9758    pub y_pos: f32,
9759    #[doc = "Z position in local frame"]
9760    pub z_pos: f32,
9761    #[doc = "Airspeed, set to -1 if unknown"]
9762    pub airspeed: f32,
9763    #[doc = "Variance of body velocity estimate"]
9764    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9765    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9766    pub vel_variance: [f32; 3],
9767    #[doc = "Variance in local position"]
9768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9769    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9770    pub pos_variance: [f32; 3],
9771    #[doc = "The attitude, represented as Quaternion"]
9772    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9773    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9774    pub q: [f32; 4],
9775    #[doc = "Angular rate in roll axis"]
9776    pub roll_rate: f32,
9777    #[doc = "Angular rate in pitch axis"]
9778    pub pitch_rate: f32,
9779    #[doc = "Angular rate in yaw axis"]
9780    pub yaw_rate: f32,
9781}
9782impl CONTROL_SYSTEM_STATE_DATA {
9783    pub const ENCODED_LEN: usize = 100usize;
9784    pub const DEFAULT: Self = Self {
9785        time_usec: 0_u64,
9786        x_acc: 0.0_f32,
9787        y_acc: 0.0_f32,
9788        z_acc: 0.0_f32,
9789        x_vel: 0.0_f32,
9790        y_vel: 0.0_f32,
9791        z_vel: 0.0_f32,
9792        x_pos: 0.0_f32,
9793        y_pos: 0.0_f32,
9794        z_pos: 0.0_f32,
9795        airspeed: 0.0_f32,
9796        vel_variance: [0.0_f32; 3usize],
9797        pos_variance: [0.0_f32; 3usize],
9798        q: [0.0_f32; 4usize],
9799        roll_rate: 0.0_f32,
9800        pitch_rate: 0.0_f32,
9801        yaw_rate: 0.0_f32,
9802    };
9803    #[cfg(feature = "arbitrary")]
9804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9805        use arbitrary::{Arbitrary, Unstructured};
9806        let mut buf = [0u8; 1024];
9807        rng.fill_bytes(&mut buf);
9808        let mut unstructured = Unstructured::new(&buf);
9809        Self::arbitrary(&mut unstructured).unwrap_or_default()
9810    }
9811}
9812impl Default for CONTROL_SYSTEM_STATE_DATA {
9813    fn default() -> Self {
9814        Self::DEFAULT.clone()
9815    }
9816}
9817impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9818    type Message = MavMessage;
9819    const ID: u32 = 146u32;
9820    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9821    const EXTRA_CRC: u8 = 103u8;
9822    const ENCODED_LEN: usize = 100usize;
9823    fn deser(
9824        _version: MavlinkVersion,
9825        __input: &[u8],
9826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9827        let avail_len = __input.len();
9828        let mut payload_buf = [0; Self::ENCODED_LEN];
9829        let mut buf = if avail_len < Self::ENCODED_LEN {
9830            payload_buf[0..avail_len].copy_from_slice(__input);
9831            Bytes::new(&payload_buf)
9832        } else {
9833            Bytes::new(__input)
9834        };
9835        let mut __struct = Self::default();
9836        __struct.time_usec = buf.get_u64_le();
9837        __struct.x_acc = buf.get_f32_le();
9838        __struct.y_acc = buf.get_f32_le();
9839        __struct.z_acc = buf.get_f32_le();
9840        __struct.x_vel = buf.get_f32_le();
9841        __struct.y_vel = buf.get_f32_le();
9842        __struct.z_vel = buf.get_f32_le();
9843        __struct.x_pos = buf.get_f32_le();
9844        __struct.y_pos = buf.get_f32_le();
9845        __struct.z_pos = buf.get_f32_le();
9846        __struct.airspeed = buf.get_f32_le();
9847        for v in &mut __struct.vel_variance {
9848            let val = buf.get_f32_le();
9849            *v = val;
9850        }
9851        for v in &mut __struct.pos_variance {
9852            let val = buf.get_f32_le();
9853            *v = val;
9854        }
9855        for v in &mut __struct.q {
9856            let val = buf.get_f32_le();
9857            *v = val;
9858        }
9859        __struct.roll_rate = buf.get_f32_le();
9860        __struct.pitch_rate = buf.get_f32_le();
9861        __struct.yaw_rate = buf.get_f32_le();
9862        Ok(__struct)
9863    }
9864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9865        let mut __tmp = BytesMut::new(bytes);
9866        #[allow(clippy::absurd_extreme_comparisons)]
9867        #[allow(unused_comparisons)]
9868        if __tmp.remaining() < Self::ENCODED_LEN {
9869            panic!(
9870                "buffer is too small (need {} bytes, but got {})",
9871                Self::ENCODED_LEN,
9872                __tmp.remaining(),
9873            )
9874        }
9875        __tmp.put_u64_le(self.time_usec);
9876        __tmp.put_f32_le(self.x_acc);
9877        __tmp.put_f32_le(self.y_acc);
9878        __tmp.put_f32_le(self.z_acc);
9879        __tmp.put_f32_le(self.x_vel);
9880        __tmp.put_f32_le(self.y_vel);
9881        __tmp.put_f32_le(self.z_vel);
9882        __tmp.put_f32_le(self.x_pos);
9883        __tmp.put_f32_le(self.y_pos);
9884        __tmp.put_f32_le(self.z_pos);
9885        __tmp.put_f32_le(self.airspeed);
9886        for val in &self.vel_variance {
9887            __tmp.put_f32_le(*val);
9888        }
9889        for val in &self.pos_variance {
9890            __tmp.put_f32_le(*val);
9891        }
9892        for val in &self.q {
9893            __tmp.put_f32_le(*val);
9894        }
9895        __tmp.put_f32_le(self.roll_rate);
9896        __tmp.put_f32_le(self.pitch_rate);
9897        __tmp.put_f32_le(self.yaw_rate);
9898        if matches!(version, MavlinkVersion::V2) {
9899            let len = __tmp.len();
9900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9901        } else {
9902            __tmp.len()
9903        }
9904    }
9905}
9906#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9907#[doc = ""]
9908#[doc = "ID: 411"]
9909#[derive(Debug, Clone, PartialEq)]
9910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9912#[cfg_attr(feature = "ts", derive(TS))]
9913#[cfg_attr(feature = "ts", ts(export))]
9914pub struct CURRENT_EVENT_SEQUENCE_DATA {
9915    #[doc = "Sequence number."]
9916    pub sequence: u16,
9917    #[doc = "Flag bitset."]
9918    pub flags: MavEventCurrentSequenceFlags,
9919}
9920impl CURRENT_EVENT_SEQUENCE_DATA {
9921    pub const ENCODED_LEN: usize = 3usize;
9922    pub const DEFAULT: Self = Self {
9923        sequence: 0_u16,
9924        flags: MavEventCurrentSequenceFlags::DEFAULT,
9925    };
9926    #[cfg(feature = "arbitrary")]
9927    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9928        use arbitrary::{Arbitrary, Unstructured};
9929        let mut buf = [0u8; 1024];
9930        rng.fill_bytes(&mut buf);
9931        let mut unstructured = Unstructured::new(&buf);
9932        Self::arbitrary(&mut unstructured).unwrap_or_default()
9933    }
9934}
9935impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9936    fn default() -> Self {
9937        Self::DEFAULT.clone()
9938    }
9939}
9940impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9941    type Message = MavMessage;
9942    const ID: u32 = 411u32;
9943    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9944    const EXTRA_CRC: u8 = 106u8;
9945    const ENCODED_LEN: usize = 3usize;
9946    fn deser(
9947        _version: MavlinkVersion,
9948        __input: &[u8],
9949    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9950        let avail_len = __input.len();
9951        let mut payload_buf = [0; Self::ENCODED_LEN];
9952        let mut buf = if avail_len < Self::ENCODED_LEN {
9953            payload_buf[0..avail_len].copy_from_slice(__input);
9954            Bytes::new(&payload_buf)
9955        } else {
9956            Bytes::new(__input)
9957        };
9958        let mut __struct = Self::default();
9959        __struct.sequence = buf.get_u16_le();
9960        let tmp = buf.get_u8();
9961        __struct.flags =
9962            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9963                enum_type: "MavEventCurrentSequenceFlags",
9964                value: tmp as u32,
9965            })?;
9966        Ok(__struct)
9967    }
9968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9969        let mut __tmp = BytesMut::new(bytes);
9970        #[allow(clippy::absurd_extreme_comparisons)]
9971        #[allow(unused_comparisons)]
9972        if __tmp.remaining() < Self::ENCODED_LEN {
9973            panic!(
9974                "buffer is too small (need {} bytes, but got {})",
9975                Self::ENCODED_LEN,
9976                __tmp.remaining(),
9977            )
9978        }
9979        __tmp.put_u16_le(self.sequence);
9980        __tmp.put_u8(self.flags as u8);
9981        if matches!(version, MavlinkVersion::V2) {
9982            let len = __tmp.len();
9983            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9984        } else {
9985            __tmp.len()
9986        }
9987    }
9988}
9989#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9990#[doc = ""]
9991#[doc = "ID: 436"]
9992#[derive(Debug, Clone, PartialEq)]
9993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9995#[cfg_attr(feature = "ts", derive(TS))]
9996#[cfg_attr(feature = "ts", ts(export))]
9997pub struct CURRENT_MODE_DATA {
9998    #[doc = "A bitfield for use for autopilot-specific flags"]
9999    pub custom_mode: u32,
10000    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10001    pub intended_custom_mode: u32,
10002    #[doc = "Standard mode."]
10003    pub standard_mode: MavStandardMode,
10004}
10005impl CURRENT_MODE_DATA {
10006    pub const ENCODED_LEN: usize = 9usize;
10007    pub const DEFAULT: Self = Self {
10008        custom_mode: 0_u32,
10009        intended_custom_mode: 0_u32,
10010        standard_mode: MavStandardMode::DEFAULT,
10011    };
10012    #[cfg(feature = "arbitrary")]
10013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10014        use arbitrary::{Arbitrary, Unstructured};
10015        let mut buf = [0u8; 1024];
10016        rng.fill_bytes(&mut buf);
10017        let mut unstructured = Unstructured::new(&buf);
10018        Self::arbitrary(&mut unstructured).unwrap_or_default()
10019    }
10020}
10021impl Default for CURRENT_MODE_DATA {
10022    fn default() -> Self {
10023        Self::DEFAULT.clone()
10024    }
10025}
10026impl MessageData for CURRENT_MODE_DATA {
10027    type Message = MavMessage;
10028    const ID: u32 = 436u32;
10029    const NAME: &'static str = "CURRENT_MODE";
10030    const EXTRA_CRC: u8 = 193u8;
10031    const ENCODED_LEN: usize = 9usize;
10032    fn deser(
10033        _version: MavlinkVersion,
10034        __input: &[u8],
10035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10036        let avail_len = __input.len();
10037        let mut payload_buf = [0; Self::ENCODED_LEN];
10038        let mut buf = if avail_len < Self::ENCODED_LEN {
10039            payload_buf[0..avail_len].copy_from_slice(__input);
10040            Bytes::new(&payload_buf)
10041        } else {
10042            Bytes::new(__input)
10043        };
10044        let mut __struct = Self::default();
10045        __struct.custom_mode = buf.get_u32_le();
10046        __struct.intended_custom_mode = buf.get_u32_le();
10047        let tmp = buf.get_u8();
10048        __struct.standard_mode =
10049            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10050                enum_type: "MavStandardMode",
10051                value: tmp as u32,
10052            })?;
10053        Ok(__struct)
10054    }
10055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10056        let mut __tmp = BytesMut::new(bytes);
10057        #[allow(clippy::absurd_extreme_comparisons)]
10058        #[allow(unused_comparisons)]
10059        if __tmp.remaining() < Self::ENCODED_LEN {
10060            panic!(
10061                "buffer is too small (need {} bytes, but got {})",
10062                Self::ENCODED_LEN,
10063                __tmp.remaining(),
10064            )
10065        }
10066        __tmp.put_u32_le(self.custom_mode);
10067        __tmp.put_u32_le(self.intended_custom_mode);
10068        __tmp.put_u8(self.standard_mode as u8);
10069        if matches!(version, MavlinkVersion::V2) {
10070            let len = __tmp.len();
10071            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10072        } else {
10073            __tmp.len()
10074        }
10075    }
10076}
10077#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10078#[doc = "Data stream status information."]
10079#[doc = ""]
10080#[doc = "ID: 67"]
10081#[derive(Debug, Clone, PartialEq)]
10082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10084#[cfg_attr(feature = "ts", derive(TS))]
10085#[cfg_attr(feature = "ts", ts(export))]
10086pub struct DATA_STREAM_DATA {
10087    #[doc = "The message rate"]
10088    pub message_rate: u16,
10089    #[doc = "The ID of the requested data stream"]
10090    pub stream_id: u8,
10091    #[doc = "1 stream is enabled, 0 stream is stopped."]
10092    pub on_off: u8,
10093}
10094impl DATA_STREAM_DATA {
10095    pub const ENCODED_LEN: usize = 4usize;
10096    pub const DEFAULT: Self = Self {
10097        message_rate: 0_u16,
10098        stream_id: 0_u8,
10099        on_off: 0_u8,
10100    };
10101    #[cfg(feature = "arbitrary")]
10102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10103        use arbitrary::{Arbitrary, Unstructured};
10104        let mut buf = [0u8; 1024];
10105        rng.fill_bytes(&mut buf);
10106        let mut unstructured = Unstructured::new(&buf);
10107        Self::arbitrary(&mut unstructured).unwrap_or_default()
10108    }
10109}
10110impl Default for DATA_STREAM_DATA {
10111    fn default() -> Self {
10112        Self::DEFAULT.clone()
10113    }
10114}
10115impl MessageData for DATA_STREAM_DATA {
10116    type Message = MavMessage;
10117    const ID: u32 = 67u32;
10118    const NAME: &'static str = "DATA_STREAM";
10119    const EXTRA_CRC: u8 = 21u8;
10120    const ENCODED_LEN: usize = 4usize;
10121    fn deser(
10122        _version: MavlinkVersion,
10123        __input: &[u8],
10124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10125        let avail_len = __input.len();
10126        let mut payload_buf = [0; Self::ENCODED_LEN];
10127        let mut buf = if avail_len < Self::ENCODED_LEN {
10128            payload_buf[0..avail_len].copy_from_slice(__input);
10129            Bytes::new(&payload_buf)
10130        } else {
10131            Bytes::new(__input)
10132        };
10133        let mut __struct = Self::default();
10134        __struct.message_rate = buf.get_u16_le();
10135        __struct.stream_id = buf.get_u8();
10136        __struct.on_off = buf.get_u8();
10137        Ok(__struct)
10138    }
10139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10140        let mut __tmp = BytesMut::new(bytes);
10141        #[allow(clippy::absurd_extreme_comparisons)]
10142        #[allow(unused_comparisons)]
10143        if __tmp.remaining() < Self::ENCODED_LEN {
10144            panic!(
10145                "buffer is too small (need {} bytes, but got {})",
10146                Self::ENCODED_LEN,
10147                __tmp.remaining(),
10148            )
10149        }
10150        __tmp.put_u16_le(self.message_rate);
10151        __tmp.put_u8(self.stream_id);
10152        __tmp.put_u8(self.on_off);
10153        if matches!(version, MavlinkVersion::V2) {
10154            let len = __tmp.len();
10155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10156        } else {
10157            __tmp.len()
10158        }
10159    }
10160}
10161#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10162#[doc = ""]
10163#[doc = "ID: 130"]
10164#[derive(Debug, Clone, PartialEq)]
10165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10167#[cfg_attr(feature = "ts", derive(TS))]
10168#[cfg_attr(feature = "ts", ts(export))]
10169pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10170    #[doc = "total data size (set on ACK only)."]
10171    pub size: u32,
10172    #[doc = "Width of a matrix or image."]
10173    pub width: u16,
10174    #[doc = "Height of a matrix or image."]
10175    pub height: u16,
10176    #[doc = "Number of packets being sent (set on ACK only)."]
10177    pub packets: u16,
10178    #[doc = "Type of requested/acknowledged data."]
10179    pub mavtype: MavlinkDataStreamType,
10180    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10181    pub payload: u8,
10182    #[doc = "JPEG quality. Values: [1-100]."]
10183    pub jpg_quality: u8,
10184}
10185impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10186    pub const ENCODED_LEN: usize = 13usize;
10187    pub const DEFAULT: Self = Self {
10188        size: 0_u32,
10189        width: 0_u16,
10190        height: 0_u16,
10191        packets: 0_u16,
10192        mavtype: MavlinkDataStreamType::DEFAULT,
10193        payload: 0_u8,
10194        jpg_quality: 0_u8,
10195    };
10196    #[cfg(feature = "arbitrary")]
10197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10198        use arbitrary::{Arbitrary, Unstructured};
10199        let mut buf = [0u8; 1024];
10200        rng.fill_bytes(&mut buf);
10201        let mut unstructured = Unstructured::new(&buf);
10202        Self::arbitrary(&mut unstructured).unwrap_or_default()
10203    }
10204}
10205impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10206    fn default() -> Self {
10207        Self::DEFAULT.clone()
10208    }
10209}
10210impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10211    type Message = MavMessage;
10212    const ID: u32 = 130u32;
10213    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10214    const EXTRA_CRC: u8 = 29u8;
10215    const ENCODED_LEN: usize = 13usize;
10216    fn deser(
10217        _version: MavlinkVersion,
10218        __input: &[u8],
10219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10220        let avail_len = __input.len();
10221        let mut payload_buf = [0; Self::ENCODED_LEN];
10222        let mut buf = if avail_len < Self::ENCODED_LEN {
10223            payload_buf[0..avail_len].copy_from_slice(__input);
10224            Bytes::new(&payload_buf)
10225        } else {
10226            Bytes::new(__input)
10227        };
10228        let mut __struct = Self::default();
10229        __struct.size = buf.get_u32_le();
10230        __struct.width = buf.get_u16_le();
10231        __struct.height = buf.get_u16_le();
10232        __struct.packets = buf.get_u16_le();
10233        let tmp = buf.get_u8();
10234        __struct.mavtype =
10235            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10236                enum_type: "MavlinkDataStreamType",
10237                value: tmp as u32,
10238            })?;
10239        __struct.payload = buf.get_u8();
10240        __struct.jpg_quality = buf.get_u8();
10241        Ok(__struct)
10242    }
10243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10244        let mut __tmp = BytesMut::new(bytes);
10245        #[allow(clippy::absurd_extreme_comparisons)]
10246        #[allow(unused_comparisons)]
10247        if __tmp.remaining() < Self::ENCODED_LEN {
10248            panic!(
10249                "buffer is too small (need {} bytes, but got {})",
10250                Self::ENCODED_LEN,
10251                __tmp.remaining(),
10252            )
10253        }
10254        __tmp.put_u32_le(self.size);
10255        __tmp.put_u16_le(self.width);
10256        __tmp.put_u16_le(self.height);
10257        __tmp.put_u16_le(self.packets);
10258        __tmp.put_u8(self.mavtype as u8);
10259        __tmp.put_u8(self.payload);
10260        __tmp.put_u8(self.jpg_quality);
10261        if matches!(version, MavlinkVersion::V2) {
10262            let len = __tmp.len();
10263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10264        } else {
10265            __tmp.len()
10266        }
10267    }
10268}
10269#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10270#[doc = ""]
10271#[doc = "ID: 254"]
10272#[derive(Debug, Clone, PartialEq)]
10273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10275#[cfg_attr(feature = "ts", derive(TS))]
10276#[cfg_attr(feature = "ts", ts(export))]
10277pub struct DEBUG_DATA {
10278    #[doc = "Timestamp (time since system boot)."]
10279    pub time_boot_ms: u32,
10280    #[doc = "DEBUG value"]
10281    pub value: f32,
10282    #[doc = "index of debug variable"]
10283    pub ind: u8,
10284}
10285impl DEBUG_DATA {
10286    pub const ENCODED_LEN: usize = 9usize;
10287    pub const DEFAULT: Self = Self {
10288        time_boot_ms: 0_u32,
10289        value: 0.0_f32,
10290        ind: 0_u8,
10291    };
10292    #[cfg(feature = "arbitrary")]
10293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10294        use arbitrary::{Arbitrary, Unstructured};
10295        let mut buf = [0u8; 1024];
10296        rng.fill_bytes(&mut buf);
10297        let mut unstructured = Unstructured::new(&buf);
10298        Self::arbitrary(&mut unstructured).unwrap_or_default()
10299    }
10300}
10301impl Default for DEBUG_DATA {
10302    fn default() -> Self {
10303        Self::DEFAULT.clone()
10304    }
10305}
10306impl MessageData for DEBUG_DATA {
10307    type Message = MavMessage;
10308    const ID: u32 = 254u32;
10309    const NAME: &'static str = "DEBUG";
10310    const EXTRA_CRC: u8 = 46u8;
10311    const ENCODED_LEN: usize = 9usize;
10312    fn deser(
10313        _version: MavlinkVersion,
10314        __input: &[u8],
10315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10316        let avail_len = __input.len();
10317        let mut payload_buf = [0; Self::ENCODED_LEN];
10318        let mut buf = if avail_len < Self::ENCODED_LEN {
10319            payload_buf[0..avail_len].copy_from_slice(__input);
10320            Bytes::new(&payload_buf)
10321        } else {
10322            Bytes::new(__input)
10323        };
10324        let mut __struct = Self::default();
10325        __struct.time_boot_ms = buf.get_u32_le();
10326        __struct.value = buf.get_f32_le();
10327        __struct.ind = buf.get_u8();
10328        Ok(__struct)
10329    }
10330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10331        let mut __tmp = BytesMut::new(bytes);
10332        #[allow(clippy::absurd_extreme_comparisons)]
10333        #[allow(unused_comparisons)]
10334        if __tmp.remaining() < Self::ENCODED_LEN {
10335            panic!(
10336                "buffer is too small (need {} bytes, but got {})",
10337                Self::ENCODED_LEN,
10338                __tmp.remaining(),
10339            )
10340        }
10341        __tmp.put_u32_le(self.time_boot_ms);
10342        __tmp.put_f32_le(self.value);
10343        __tmp.put_u8(self.ind);
10344        if matches!(version, MavlinkVersion::V2) {
10345            let len = __tmp.len();
10346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10347        } else {
10348            __tmp.len()
10349        }
10350    }
10351}
10352#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10353#[doc = ""]
10354#[doc = "ID: 350"]
10355#[derive(Debug, Clone, PartialEq)]
10356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10358#[cfg_attr(feature = "ts", derive(TS))]
10359#[cfg_attr(feature = "ts", ts(export))]
10360pub struct DEBUG_FLOAT_ARRAY_DATA {
10361    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10362    pub time_usec: u64,
10363    #[doc = "Unique ID used to discriminate between arrays"]
10364    pub array_id: u16,
10365    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10368    pub name: [u8; 10],
10369    #[doc = "data"]
10370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10371    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10372    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10373    pub data: [f32; 58],
10374}
10375impl DEBUG_FLOAT_ARRAY_DATA {
10376    pub const ENCODED_LEN: usize = 252usize;
10377    pub const DEFAULT: Self = Self {
10378        time_usec: 0_u64,
10379        array_id: 0_u16,
10380        name: [0_u8; 10usize],
10381        data: [0.0_f32; 58usize],
10382    };
10383    #[cfg(feature = "arbitrary")]
10384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10385        use arbitrary::{Arbitrary, Unstructured};
10386        let mut buf = [0u8; 1024];
10387        rng.fill_bytes(&mut buf);
10388        let mut unstructured = Unstructured::new(&buf);
10389        Self::arbitrary(&mut unstructured).unwrap_or_default()
10390    }
10391}
10392impl Default for DEBUG_FLOAT_ARRAY_DATA {
10393    fn default() -> Self {
10394        Self::DEFAULT.clone()
10395    }
10396}
10397impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10398    type Message = MavMessage;
10399    const ID: u32 = 350u32;
10400    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10401    const EXTRA_CRC: u8 = 232u8;
10402    const ENCODED_LEN: usize = 252usize;
10403    fn deser(
10404        _version: MavlinkVersion,
10405        __input: &[u8],
10406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10407        let avail_len = __input.len();
10408        let mut payload_buf = [0; Self::ENCODED_LEN];
10409        let mut buf = if avail_len < Self::ENCODED_LEN {
10410            payload_buf[0..avail_len].copy_from_slice(__input);
10411            Bytes::new(&payload_buf)
10412        } else {
10413            Bytes::new(__input)
10414        };
10415        let mut __struct = Self::default();
10416        __struct.time_usec = buf.get_u64_le();
10417        __struct.array_id = buf.get_u16_le();
10418        for v in &mut __struct.name {
10419            let val = buf.get_u8();
10420            *v = val;
10421        }
10422        for v in &mut __struct.data {
10423            let val = buf.get_f32_le();
10424            *v = val;
10425        }
10426        Ok(__struct)
10427    }
10428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10429        let mut __tmp = BytesMut::new(bytes);
10430        #[allow(clippy::absurd_extreme_comparisons)]
10431        #[allow(unused_comparisons)]
10432        if __tmp.remaining() < Self::ENCODED_LEN {
10433            panic!(
10434                "buffer is too small (need {} bytes, but got {})",
10435                Self::ENCODED_LEN,
10436                __tmp.remaining(),
10437            )
10438        }
10439        __tmp.put_u64_le(self.time_usec);
10440        __tmp.put_u16_le(self.array_id);
10441        for val in &self.name {
10442            __tmp.put_u8(*val);
10443        }
10444        if matches!(version, MavlinkVersion::V2) {
10445            for val in &self.data {
10446                __tmp.put_f32_le(*val);
10447            }
10448            let len = __tmp.len();
10449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10450        } else {
10451            __tmp.len()
10452        }
10453    }
10454}
10455#[doc = "To debug something using a named 3D vector."]
10456#[doc = ""]
10457#[doc = "ID: 250"]
10458#[derive(Debug, Clone, PartialEq)]
10459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10461#[cfg_attr(feature = "ts", derive(TS))]
10462#[cfg_attr(feature = "ts", ts(export))]
10463pub struct DEBUG_VECT_DATA {
10464    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10465    pub time_usec: u64,
10466    #[doc = "x"]
10467    pub x: f32,
10468    #[doc = "y"]
10469    pub y: f32,
10470    #[doc = "z"]
10471    pub z: f32,
10472    #[doc = "Name"]
10473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10475    pub name: [u8; 10],
10476}
10477impl DEBUG_VECT_DATA {
10478    pub const ENCODED_LEN: usize = 30usize;
10479    pub const DEFAULT: Self = Self {
10480        time_usec: 0_u64,
10481        x: 0.0_f32,
10482        y: 0.0_f32,
10483        z: 0.0_f32,
10484        name: [0_u8; 10usize],
10485    };
10486    #[cfg(feature = "arbitrary")]
10487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10488        use arbitrary::{Arbitrary, Unstructured};
10489        let mut buf = [0u8; 1024];
10490        rng.fill_bytes(&mut buf);
10491        let mut unstructured = Unstructured::new(&buf);
10492        Self::arbitrary(&mut unstructured).unwrap_or_default()
10493    }
10494}
10495impl Default for DEBUG_VECT_DATA {
10496    fn default() -> Self {
10497        Self::DEFAULT.clone()
10498    }
10499}
10500impl MessageData for DEBUG_VECT_DATA {
10501    type Message = MavMessage;
10502    const ID: u32 = 250u32;
10503    const NAME: &'static str = "DEBUG_VECT";
10504    const EXTRA_CRC: u8 = 49u8;
10505    const ENCODED_LEN: usize = 30usize;
10506    fn deser(
10507        _version: MavlinkVersion,
10508        __input: &[u8],
10509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10510        let avail_len = __input.len();
10511        let mut payload_buf = [0; Self::ENCODED_LEN];
10512        let mut buf = if avail_len < Self::ENCODED_LEN {
10513            payload_buf[0..avail_len].copy_from_slice(__input);
10514            Bytes::new(&payload_buf)
10515        } else {
10516            Bytes::new(__input)
10517        };
10518        let mut __struct = Self::default();
10519        __struct.time_usec = buf.get_u64_le();
10520        __struct.x = buf.get_f32_le();
10521        __struct.y = buf.get_f32_le();
10522        __struct.z = buf.get_f32_le();
10523        for v in &mut __struct.name {
10524            let val = buf.get_u8();
10525            *v = val;
10526        }
10527        Ok(__struct)
10528    }
10529    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10530        let mut __tmp = BytesMut::new(bytes);
10531        #[allow(clippy::absurd_extreme_comparisons)]
10532        #[allow(unused_comparisons)]
10533        if __tmp.remaining() < Self::ENCODED_LEN {
10534            panic!(
10535                "buffer is too small (need {} bytes, but got {})",
10536                Self::ENCODED_LEN,
10537                __tmp.remaining(),
10538            )
10539        }
10540        __tmp.put_u64_le(self.time_usec);
10541        __tmp.put_f32_le(self.x);
10542        __tmp.put_f32_le(self.y);
10543        __tmp.put_f32_le(self.z);
10544        for val in &self.name {
10545            __tmp.put_u8(*val);
10546        }
10547        if matches!(version, MavlinkVersion::V2) {
10548            let len = __tmp.len();
10549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10550        } else {
10551            __tmp.len()
10552        }
10553    }
10554}
10555#[doc = "Distance sensor information for an onboard rangefinder."]
10556#[doc = ""]
10557#[doc = "ID: 132"]
10558#[derive(Debug, Clone, PartialEq)]
10559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10561#[cfg_attr(feature = "ts", derive(TS))]
10562#[cfg_attr(feature = "ts", ts(export))]
10563pub struct DISTANCE_SENSOR_DATA {
10564    #[doc = "Timestamp (time since system boot)."]
10565    pub time_boot_ms: u32,
10566    #[doc = "Minimum distance the sensor can measure"]
10567    pub min_distance: u16,
10568    #[doc = "Maximum distance the sensor can measure"]
10569    pub max_distance: u16,
10570    #[doc = "Current distance reading"]
10571    pub current_distance: u16,
10572    #[doc = "Type of distance sensor."]
10573    pub mavtype: MavDistanceSensor,
10574    #[doc = "Onboard ID of the sensor"]
10575    pub id: u8,
10576    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10577    pub orientation: MavSensorOrientation,
10578    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10579    pub covariance: u8,
10580    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10581    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10582    pub horizontal_fov: f32,
10583    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10585    pub vertical_fov: f32,
10586    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10588    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10589    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10590    pub quaternion: [f32; 4],
10591    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10593    pub signal_quality: u8,
10594}
10595impl DISTANCE_SENSOR_DATA {
10596    pub const ENCODED_LEN: usize = 39usize;
10597    pub const DEFAULT: Self = Self {
10598        time_boot_ms: 0_u32,
10599        min_distance: 0_u16,
10600        max_distance: 0_u16,
10601        current_distance: 0_u16,
10602        mavtype: MavDistanceSensor::DEFAULT,
10603        id: 0_u8,
10604        orientation: MavSensorOrientation::DEFAULT,
10605        covariance: 0_u8,
10606        horizontal_fov: 0.0_f32,
10607        vertical_fov: 0.0_f32,
10608        quaternion: [0.0_f32; 4usize],
10609        signal_quality: 0_u8,
10610    };
10611    #[cfg(feature = "arbitrary")]
10612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10613        use arbitrary::{Arbitrary, Unstructured};
10614        let mut buf = [0u8; 1024];
10615        rng.fill_bytes(&mut buf);
10616        let mut unstructured = Unstructured::new(&buf);
10617        Self::arbitrary(&mut unstructured).unwrap_or_default()
10618    }
10619}
10620impl Default for DISTANCE_SENSOR_DATA {
10621    fn default() -> Self {
10622        Self::DEFAULT.clone()
10623    }
10624}
10625impl MessageData for DISTANCE_SENSOR_DATA {
10626    type Message = MavMessage;
10627    const ID: u32 = 132u32;
10628    const NAME: &'static str = "DISTANCE_SENSOR";
10629    const EXTRA_CRC: u8 = 85u8;
10630    const ENCODED_LEN: usize = 39usize;
10631    fn deser(
10632        _version: MavlinkVersion,
10633        __input: &[u8],
10634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10635        let avail_len = __input.len();
10636        let mut payload_buf = [0; Self::ENCODED_LEN];
10637        let mut buf = if avail_len < Self::ENCODED_LEN {
10638            payload_buf[0..avail_len].copy_from_slice(__input);
10639            Bytes::new(&payload_buf)
10640        } else {
10641            Bytes::new(__input)
10642        };
10643        let mut __struct = Self::default();
10644        __struct.time_boot_ms = buf.get_u32_le();
10645        __struct.min_distance = buf.get_u16_le();
10646        __struct.max_distance = buf.get_u16_le();
10647        __struct.current_distance = buf.get_u16_le();
10648        let tmp = buf.get_u8();
10649        __struct.mavtype =
10650            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10651                enum_type: "MavDistanceSensor",
10652                value: tmp as u32,
10653            })?;
10654        __struct.id = buf.get_u8();
10655        let tmp = buf.get_u8();
10656        __struct.orientation =
10657            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10658                enum_type: "MavSensorOrientation",
10659                value: tmp as u32,
10660            })?;
10661        __struct.covariance = buf.get_u8();
10662        __struct.horizontal_fov = buf.get_f32_le();
10663        __struct.vertical_fov = buf.get_f32_le();
10664        for v in &mut __struct.quaternion {
10665            let val = buf.get_f32_le();
10666            *v = val;
10667        }
10668        __struct.signal_quality = buf.get_u8();
10669        Ok(__struct)
10670    }
10671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10672        let mut __tmp = BytesMut::new(bytes);
10673        #[allow(clippy::absurd_extreme_comparisons)]
10674        #[allow(unused_comparisons)]
10675        if __tmp.remaining() < Self::ENCODED_LEN {
10676            panic!(
10677                "buffer is too small (need {} bytes, but got {})",
10678                Self::ENCODED_LEN,
10679                __tmp.remaining(),
10680            )
10681        }
10682        __tmp.put_u32_le(self.time_boot_ms);
10683        __tmp.put_u16_le(self.min_distance);
10684        __tmp.put_u16_le(self.max_distance);
10685        __tmp.put_u16_le(self.current_distance);
10686        __tmp.put_u8(self.mavtype as u8);
10687        __tmp.put_u8(self.id);
10688        __tmp.put_u8(self.orientation as u8);
10689        __tmp.put_u8(self.covariance);
10690        if matches!(version, MavlinkVersion::V2) {
10691            __tmp.put_f32_le(self.horizontal_fov);
10692            __tmp.put_f32_le(self.vertical_fov);
10693            for val in &self.quaternion {
10694                __tmp.put_f32_le(*val);
10695            }
10696            __tmp.put_u8(self.signal_quality);
10697            let len = __tmp.len();
10698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10699        } else {
10700            __tmp.len()
10701        }
10702    }
10703}
10704#[doc = "EFI status output."]
10705#[doc = ""]
10706#[doc = "ID: 225"]
10707#[derive(Debug, Clone, PartialEq)]
10708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10710#[cfg_attr(feature = "ts", derive(TS))]
10711#[cfg_attr(feature = "ts", ts(export))]
10712pub struct EFI_STATUS_DATA {
10713    #[doc = "ECU index"]
10714    pub ecu_index: f32,
10715    #[doc = "RPM"]
10716    pub rpm: f32,
10717    #[doc = "Fuel consumed"]
10718    pub fuel_consumed: f32,
10719    #[doc = "Fuel flow rate"]
10720    pub fuel_flow: f32,
10721    #[doc = "Engine load"]
10722    pub engine_load: f32,
10723    #[doc = "Throttle position"]
10724    pub throttle_position: f32,
10725    #[doc = "Spark dwell time"]
10726    pub spark_dwell_time: f32,
10727    #[doc = "Barometric pressure"]
10728    pub barometric_pressure: f32,
10729    #[doc = "Intake manifold pressure("]
10730    pub intake_manifold_pressure: f32,
10731    #[doc = "Intake manifold temperature"]
10732    pub intake_manifold_temperature: f32,
10733    #[doc = "Cylinder head temperature"]
10734    pub cylinder_head_temperature: f32,
10735    #[doc = "Ignition timing (Crank angle degrees)"]
10736    pub ignition_timing: f32,
10737    #[doc = "Injection time"]
10738    pub injection_time: f32,
10739    #[doc = "Exhaust gas temperature"]
10740    pub exhaust_gas_temperature: f32,
10741    #[doc = "Output throttle"]
10742    pub throttle_out: f32,
10743    #[doc = "Pressure/temperature compensation"]
10744    pub pt_compensation: f32,
10745    #[doc = "EFI health status"]
10746    pub health: u8,
10747    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10748    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10749    pub ignition_voltage: f32,
10750    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10752    pub fuel_pressure: f32,
10753}
10754impl EFI_STATUS_DATA {
10755    pub const ENCODED_LEN: usize = 73usize;
10756    pub const DEFAULT: Self = Self {
10757        ecu_index: 0.0_f32,
10758        rpm: 0.0_f32,
10759        fuel_consumed: 0.0_f32,
10760        fuel_flow: 0.0_f32,
10761        engine_load: 0.0_f32,
10762        throttle_position: 0.0_f32,
10763        spark_dwell_time: 0.0_f32,
10764        barometric_pressure: 0.0_f32,
10765        intake_manifold_pressure: 0.0_f32,
10766        intake_manifold_temperature: 0.0_f32,
10767        cylinder_head_temperature: 0.0_f32,
10768        ignition_timing: 0.0_f32,
10769        injection_time: 0.0_f32,
10770        exhaust_gas_temperature: 0.0_f32,
10771        throttle_out: 0.0_f32,
10772        pt_compensation: 0.0_f32,
10773        health: 0_u8,
10774        ignition_voltage: 0.0_f32,
10775        fuel_pressure: 0.0_f32,
10776    };
10777    #[cfg(feature = "arbitrary")]
10778    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10779        use arbitrary::{Arbitrary, Unstructured};
10780        let mut buf = [0u8; 1024];
10781        rng.fill_bytes(&mut buf);
10782        let mut unstructured = Unstructured::new(&buf);
10783        Self::arbitrary(&mut unstructured).unwrap_or_default()
10784    }
10785}
10786impl Default for EFI_STATUS_DATA {
10787    fn default() -> Self {
10788        Self::DEFAULT.clone()
10789    }
10790}
10791impl MessageData for EFI_STATUS_DATA {
10792    type Message = MavMessage;
10793    const ID: u32 = 225u32;
10794    const NAME: &'static str = "EFI_STATUS";
10795    const EXTRA_CRC: u8 = 208u8;
10796    const ENCODED_LEN: usize = 73usize;
10797    fn deser(
10798        _version: MavlinkVersion,
10799        __input: &[u8],
10800    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10801        let avail_len = __input.len();
10802        let mut payload_buf = [0; Self::ENCODED_LEN];
10803        let mut buf = if avail_len < Self::ENCODED_LEN {
10804            payload_buf[0..avail_len].copy_from_slice(__input);
10805            Bytes::new(&payload_buf)
10806        } else {
10807            Bytes::new(__input)
10808        };
10809        let mut __struct = Self::default();
10810        __struct.ecu_index = buf.get_f32_le();
10811        __struct.rpm = buf.get_f32_le();
10812        __struct.fuel_consumed = buf.get_f32_le();
10813        __struct.fuel_flow = buf.get_f32_le();
10814        __struct.engine_load = buf.get_f32_le();
10815        __struct.throttle_position = buf.get_f32_le();
10816        __struct.spark_dwell_time = buf.get_f32_le();
10817        __struct.barometric_pressure = buf.get_f32_le();
10818        __struct.intake_manifold_pressure = buf.get_f32_le();
10819        __struct.intake_manifold_temperature = buf.get_f32_le();
10820        __struct.cylinder_head_temperature = buf.get_f32_le();
10821        __struct.ignition_timing = buf.get_f32_le();
10822        __struct.injection_time = buf.get_f32_le();
10823        __struct.exhaust_gas_temperature = buf.get_f32_le();
10824        __struct.throttle_out = buf.get_f32_le();
10825        __struct.pt_compensation = buf.get_f32_le();
10826        __struct.health = buf.get_u8();
10827        __struct.ignition_voltage = buf.get_f32_le();
10828        __struct.fuel_pressure = buf.get_f32_le();
10829        Ok(__struct)
10830    }
10831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10832        let mut __tmp = BytesMut::new(bytes);
10833        #[allow(clippy::absurd_extreme_comparisons)]
10834        #[allow(unused_comparisons)]
10835        if __tmp.remaining() < Self::ENCODED_LEN {
10836            panic!(
10837                "buffer is too small (need {} bytes, but got {})",
10838                Self::ENCODED_LEN,
10839                __tmp.remaining(),
10840            )
10841        }
10842        __tmp.put_f32_le(self.ecu_index);
10843        __tmp.put_f32_le(self.rpm);
10844        __tmp.put_f32_le(self.fuel_consumed);
10845        __tmp.put_f32_le(self.fuel_flow);
10846        __tmp.put_f32_le(self.engine_load);
10847        __tmp.put_f32_le(self.throttle_position);
10848        __tmp.put_f32_le(self.spark_dwell_time);
10849        __tmp.put_f32_le(self.barometric_pressure);
10850        __tmp.put_f32_le(self.intake_manifold_pressure);
10851        __tmp.put_f32_le(self.intake_manifold_temperature);
10852        __tmp.put_f32_le(self.cylinder_head_temperature);
10853        __tmp.put_f32_le(self.ignition_timing);
10854        __tmp.put_f32_le(self.injection_time);
10855        __tmp.put_f32_le(self.exhaust_gas_temperature);
10856        __tmp.put_f32_le(self.throttle_out);
10857        __tmp.put_f32_le(self.pt_compensation);
10858        __tmp.put_u8(self.health);
10859        if matches!(version, MavlinkVersion::V2) {
10860            __tmp.put_f32_le(self.ignition_voltage);
10861            __tmp.put_f32_le(self.fuel_pressure);
10862            let len = __tmp.len();
10863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10864        } else {
10865            __tmp.len()
10866        }
10867    }
10868}
10869#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10870#[doc = ""]
10871#[doc = "ID: 131"]
10872#[derive(Debug, Clone, PartialEq)]
10873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10875#[cfg_attr(feature = "ts", derive(TS))]
10876#[cfg_attr(feature = "ts", ts(export))]
10877pub struct ENCAPSULATED_DATA_DATA {
10878    #[doc = "sequence number (starting with 0 on every transmission)"]
10879    pub seqnr: u16,
10880    #[doc = "image data bytes"]
10881    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10882    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10883    pub data: [u8; 253],
10884}
10885impl ENCAPSULATED_DATA_DATA {
10886    pub const ENCODED_LEN: usize = 255usize;
10887    pub const DEFAULT: Self = Self {
10888        seqnr: 0_u16,
10889        data: [0_u8; 253usize],
10890    };
10891    #[cfg(feature = "arbitrary")]
10892    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10893        use arbitrary::{Arbitrary, Unstructured};
10894        let mut buf = [0u8; 1024];
10895        rng.fill_bytes(&mut buf);
10896        let mut unstructured = Unstructured::new(&buf);
10897        Self::arbitrary(&mut unstructured).unwrap_or_default()
10898    }
10899}
10900impl Default for ENCAPSULATED_DATA_DATA {
10901    fn default() -> Self {
10902        Self::DEFAULT.clone()
10903    }
10904}
10905impl MessageData for ENCAPSULATED_DATA_DATA {
10906    type Message = MavMessage;
10907    const ID: u32 = 131u32;
10908    const NAME: &'static str = "ENCAPSULATED_DATA";
10909    const EXTRA_CRC: u8 = 223u8;
10910    const ENCODED_LEN: usize = 255usize;
10911    fn deser(
10912        _version: MavlinkVersion,
10913        __input: &[u8],
10914    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10915        let avail_len = __input.len();
10916        let mut payload_buf = [0; Self::ENCODED_LEN];
10917        let mut buf = if avail_len < Self::ENCODED_LEN {
10918            payload_buf[0..avail_len].copy_from_slice(__input);
10919            Bytes::new(&payload_buf)
10920        } else {
10921            Bytes::new(__input)
10922        };
10923        let mut __struct = Self::default();
10924        __struct.seqnr = buf.get_u16_le();
10925        for v in &mut __struct.data {
10926            let val = buf.get_u8();
10927            *v = val;
10928        }
10929        Ok(__struct)
10930    }
10931    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10932        let mut __tmp = BytesMut::new(bytes);
10933        #[allow(clippy::absurd_extreme_comparisons)]
10934        #[allow(unused_comparisons)]
10935        if __tmp.remaining() < Self::ENCODED_LEN {
10936            panic!(
10937                "buffer is too small (need {} bytes, but got {})",
10938                Self::ENCODED_LEN,
10939                __tmp.remaining(),
10940            )
10941        }
10942        __tmp.put_u16_le(self.seqnr);
10943        for val in &self.data {
10944            __tmp.put_u8(*val);
10945        }
10946        if matches!(version, MavlinkVersion::V2) {
10947            let len = __tmp.len();
10948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10949        } else {
10950            __tmp.len()
10951        }
10952    }
10953}
10954#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10955#[doc = ""]
10956#[doc = "ID: 290"]
10957#[derive(Debug, Clone, PartialEq)]
10958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10960#[cfg_attr(feature = "ts", derive(TS))]
10961#[cfg_attr(feature = "ts", ts(export))]
10962pub struct ESC_INFO_DATA {
10963    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10964    pub time_usec: u64,
10965    #[doc = "Number of reported errors by each ESC since boot."]
10966    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10967    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10968    pub error_count: [u32; 4],
10969    #[doc = "Counter of data packets received."]
10970    pub counter: u16,
10971    #[doc = "Bitmap of ESC failure flags."]
10972    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10973    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10974    pub failure_flags: [u16; 4],
10975    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10976    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10977    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10978    pub temperature: [i16; 4],
10979    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10980    pub index: u8,
10981    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10982    pub count: u8,
10983    #[doc = "Connection type protocol for all ESC."]
10984    pub connection_type: EscConnectionType,
10985    #[doc = "Information regarding online/offline status of each ESC."]
10986    pub info: u8,
10987}
10988impl ESC_INFO_DATA {
10989    pub const ENCODED_LEN: usize = 46usize;
10990    pub const DEFAULT: Self = Self {
10991        time_usec: 0_u64,
10992        error_count: [0_u32; 4usize],
10993        counter: 0_u16,
10994        failure_flags: [0_u16; 4usize],
10995        temperature: [0_i16; 4usize],
10996        index: 0_u8,
10997        count: 0_u8,
10998        connection_type: EscConnectionType::DEFAULT,
10999        info: 0_u8,
11000    };
11001    #[cfg(feature = "arbitrary")]
11002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11003        use arbitrary::{Arbitrary, Unstructured};
11004        let mut buf = [0u8; 1024];
11005        rng.fill_bytes(&mut buf);
11006        let mut unstructured = Unstructured::new(&buf);
11007        Self::arbitrary(&mut unstructured).unwrap_or_default()
11008    }
11009}
11010impl Default for ESC_INFO_DATA {
11011    fn default() -> Self {
11012        Self::DEFAULT.clone()
11013    }
11014}
11015impl MessageData for ESC_INFO_DATA {
11016    type Message = MavMessage;
11017    const ID: u32 = 290u32;
11018    const NAME: &'static str = "ESC_INFO";
11019    const EXTRA_CRC: u8 = 251u8;
11020    const ENCODED_LEN: usize = 46usize;
11021    fn deser(
11022        _version: MavlinkVersion,
11023        __input: &[u8],
11024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11025        let avail_len = __input.len();
11026        let mut payload_buf = [0; Self::ENCODED_LEN];
11027        let mut buf = if avail_len < Self::ENCODED_LEN {
11028            payload_buf[0..avail_len].copy_from_slice(__input);
11029            Bytes::new(&payload_buf)
11030        } else {
11031            Bytes::new(__input)
11032        };
11033        let mut __struct = Self::default();
11034        __struct.time_usec = buf.get_u64_le();
11035        for v in &mut __struct.error_count {
11036            let val = buf.get_u32_le();
11037            *v = val;
11038        }
11039        __struct.counter = buf.get_u16_le();
11040        for v in &mut __struct.failure_flags {
11041            let val = buf.get_u16_le();
11042            *v = val;
11043        }
11044        for v in &mut __struct.temperature {
11045            let val = buf.get_i16_le();
11046            *v = val;
11047        }
11048        __struct.index = buf.get_u8();
11049        __struct.count = buf.get_u8();
11050        let tmp = buf.get_u8();
11051        __struct.connection_type =
11052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11053                enum_type: "EscConnectionType",
11054                value: tmp as u32,
11055            })?;
11056        __struct.info = buf.get_u8();
11057        Ok(__struct)
11058    }
11059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11060        let mut __tmp = BytesMut::new(bytes);
11061        #[allow(clippy::absurd_extreme_comparisons)]
11062        #[allow(unused_comparisons)]
11063        if __tmp.remaining() < Self::ENCODED_LEN {
11064            panic!(
11065                "buffer is too small (need {} bytes, but got {})",
11066                Self::ENCODED_LEN,
11067                __tmp.remaining(),
11068            )
11069        }
11070        __tmp.put_u64_le(self.time_usec);
11071        for val in &self.error_count {
11072            __tmp.put_u32_le(*val);
11073        }
11074        __tmp.put_u16_le(self.counter);
11075        for val in &self.failure_flags {
11076            __tmp.put_u16_le(*val);
11077        }
11078        for val in &self.temperature {
11079            __tmp.put_i16_le(*val);
11080        }
11081        __tmp.put_u8(self.index);
11082        __tmp.put_u8(self.count);
11083        __tmp.put_u8(self.connection_type as u8);
11084        __tmp.put_u8(self.info);
11085        if matches!(version, MavlinkVersion::V2) {
11086            let len = __tmp.len();
11087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11088        } else {
11089            __tmp.len()
11090        }
11091    }
11092}
11093#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11094#[doc = ""]
11095#[doc = "ID: 291"]
11096#[derive(Debug, Clone, PartialEq)]
11097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11099#[cfg_attr(feature = "ts", derive(TS))]
11100#[cfg_attr(feature = "ts", ts(export))]
11101pub struct ESC_STATUS_DATA {
11102    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11103    pub time_usec: u64,
11104    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11105    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11106    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11107    pub rpm: [i32; 4],
11108    #[doc = "Voltage measured from each ESC."]
11109    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11110    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11111    pub voltage: [f32; 4],
11112    #[doc = "Current measured from each ESC."]
11113    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11114    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11115    pub current: [f32; 4],
11116    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11117    pub index: u8,
11118}
11119impl ESC_STATUS_DATA {
11120    pub const ENCODED_LEN: usize = 57usize;
11121    pub const DEFAULT: Self = Self {
11122        time_usec: 0_u64,
11123        rpm: [0_i32; 4usize],
11124        voltage: [0.0_f32; 4usize],
11125        current: [0.0_f32; 4usize],
11126        index: 0_u8,
11127    };
11128    #[cfg(feature = "arbitrary")]
11129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11130        use arbitrary::{Arbitrary, Unstructured};
11131        let mut buf = [0u8; 1024];
11132        rng.fill_bytes(&mut buf);
11133        let mut unstructured = Unstructured::new(&buf);
11134        Self::arbitrary(&mut unstructured).unwrap_or_default()
11135    }
11136}
11137impl Default for ESC_STATUS_DATA {
11138    fn default() -> Self {
11139        Self::DEFAULT.clone()
11140    }
11141}
11142impl MessageData for ESC_STATUS_DATA {
11143    type Message = MavMessage;
11144    const ID: u32 = 291u32;
11145    const NAME: &'static str = "ESC_STATUS";
11146    const EXTRA_CRC: u8 = 10u8;
11147    const ENCODED_LEN: usize = 57usize;
11148    fn deser(
11149        _version: MavlinkVersion,
11150        __input: &[u8],
11151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11152        let avail_len = __input.len();
11153        let mut payload_buf = [0; Self::ENCODED_LEN];
11154        let mut buf = if avail_len < Self::ENCODED_LEN {
11155            payload_buf[0..avail_len].copy_from_slice(__input);
11156            Bytes::new(&payload_buf)
11157        } else {
11158            Bytes::new(__input)
11159        };
11160        let mut __struct = Self::default();
11161        __struct.time_usec = buf.get_u64_le();
11162        for v in &mut __struct.rpm {
11163            let val = buf.get_i32_le();
11164            *v = val;
11165        }
11166        for v in &mut __struct.voltage {
11167            let val = buf.get_f32_le();
11168            *v = val;
11169        }
11170        for v in &mut __struct.current {
11171            let val = buf.get_f32_le();
11172            *v = val;
11173        }
11174        __struct.index = buf.get_u8();
11175        Ok(__struct)
11176    }
11177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11178        let mut __tmp = BytesMut::new(bytes);
11179        #[allow(clippy::absurd_extreme_comparisons)]
11180        #[allow(unused_comparisons)]
11181        if __tmp.remaining() < Self::ENCODED_LEN {
11182            panic!(
11183                "buffer is too small (need {} bytes, but got {})",
11184                Self::ENCODED_LEN,
11185                __tmp.remaining(),
11186            )
11187        }
11188        __tmp.put_u64_le(self.time_usec);
11189        for val in &self.rpm {
11190            __tmp.put_i32_le(*val);
11191        }
11192        for val in &self.voltage {
11193            __tmp.put_f32_le(*val);
11194        }
11195        for val in &self.current {
11196            __tmp.put_f32_le(*val);
11197        }
11198        __tmp.put_u8(self.index);
11199        if matches!(version, MavlinkVersion::V2) {
11200            let len = __tmp.len();
11201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11202        } else {
11203            __tmp.len()
11204        }
11205    }
11206}
11207#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11208#[doc = ""]
11209#[doc = "ID: 230"]
11210#[derive(Debug, Clone, PartialEq)]
11211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11213#[cfg_attr(feature = "ts", derive(TS))]
11214#[cfg_attr(feature = "ts", ts(export))]
11215pub struct ESTIMATOR_STATUS_DATA {
11216    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11217    pub time_usec: u64,
11218    #[doc = "Velocity innovation test ratio"]
11219    pub vel_ratio: f32,
11220    #[doc = "Horizontal position innovation test ratio"]
11221    pub pos_horiz_ratio: f32,
11222    #[doc = "Vertical position innovation test ratio"]
11223    pub pos_vert_ratio: f32,
11224    #[doc = "Magnetometer innovation test ratio"]
11225    pub mag_ratio: f32,
11226    #[doc = "Height above terrain innovation test ratio"]
11227    pub hagl_ratio: f32,
11228    #[doc = "True airspeed innovation test ratio"]
11229    pub tas_ratio: f32,
11230    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11231    pub pos_horiz_accuracy: f32,
11232    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11233    pub pos_vert_accuracy: f32,
11234    #[doc = "Bitmap indicating which EKF outputs are valid."]
11235    pub flags: EstimatorStatusFlags,
11236}
11237impl ESTIMATOR_STATUS_DATA {
11238    pub const ENCODED_LEN: usize = 42usize;
11239    pub const DEFAULT: Self = Self {
11240        time_usec: 0_u64,
11241        vel_ratio: 0.0_f32,
11242        pos_horiz_ratio: 0.0_f32,
11243        pos_vert_ratio: 0.0_f32,
11244        mag_ratio: 0.0_f32,
11245        hagl_ratio: 0.0_f32,
11246        tas_ratio: 0.0_f32,
11247        pos_horiz_accuracy: 0.0_f32,
11248        pos_vert_accuracy: 0.0_f32,
11249        flags: EstimatorStatusFlags::DEFAULT,
11250    };
11251    #[cfg(feature = "arbitrary")]
11252    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11253        use arbitrary::{Arbitrary, Unstructured};
11254        let mut buf = [0u8; 1024];
11255        rng.fill_bytes(&mut buf);
11256        let mut unstructured = Unstructured::new(&buf);
11257        Self::arbitrary(&mut unstructured).unwrap_or_default()
11258    }
11259}
11260impl Default for ESTIMATOR_STATUS_DATA {
11261    fn default() -> Self {
11262        Self::DEFAULT.clone()
11263    }
11264}
11265impl MessageData for ESTIMATOR_STATUS_DATA {
11266    type Message = MavMessage;
11267    const ID: u32 = 230u32;
11268    const NAME: &'static str = "ESTIMATOR_STATUS";
11269    const EXTRA_CRC: u8 = 163u8;
11270    const ENCODED_LEN: usize = 42usize;
11271    fn deser(
11272        _version: MavlinkVersion,
11273        __input: &[u8],
11274    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11275        let avail_len = __input.len();
11276        let mut payload_buf = [0; Self::ENCODED_LEN];
11277        let mut buf = if avail_len < Self::ENCODED_LEN {
11278            payload_buf[0..avail_len].copy_from_slice(__input);
11279            Bytes::new(&payload_buf)
11280        } else {
11281            Bytes::new(__input)
11282        };
11283        let mut __struct = Self::default();
11284        __struct.time_usec = buf.get_u64_le();
11285        __struct.vel_ratio = buf.get_f32_le();
11286        __struct.pos_horiz_ratio = buf.get_f32_le();
11287        __struct.pos_vert_ratio = buf.get_f32_le();
11288        __struct.mag_ratio = buf.get_f32_le();
11289        __struct.hagl_ratio = buf.get_f32_le();
11290        __struct.tas_ratio = buf.get_f32_le();
11291        __struct.pos_horiz_accuracy = buf.get_f32_le();
11292        __struct.pos_vert_accuracy = buf.get_f32_le();
11293        let tmp = buf.get_u16_le();
11294        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11295            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11296                flag_type: "EstimatorStatusFlags",
11297                value: tmp as u32,
11298            })?;
11299        Ok(__struct)
11300    }
11301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11302        let mut __tmp = BytesMut::new(bytes);
11303        #[allow(clippy::absurd_extreme_comparisons)]
11304        #[allow(unused_comparisons)]
11305        if __tmp.remaining() < Self::ENCODED_LEN {
11306            panic!(
11307                "buffer is too small (need {} bytes, but got {})",
11308                Self::ENCODED_LEN,
11309                __tmp.remaining(),
11310            )
11311        }
11312        __tmp.put_u64_le(self.time_usec);
11313        __tmp.put_f32_le(self.vel_ratio);
11314        __tmp.put_f32_le(self.pos_horiz_ratio);
11315        __tmp.put_f32_le(self.pos_vert_ratio);
11316        __tmp.put_f32_le(self.mag_ratio);
11317        __tmp.put_f32_le(self.hagl_ratio);
11318        __tmp.put_f32_le(self.tas_ratio);
11319        __tmp.put_f32_le(self.pos_horiz_accuracy);
11320        __tmp.put_f32_le(self.pos_vert_accuracy);
11321        __tmp.put_u16_le(self.flags.bits());
11322        if matches!(version, MavlinkVersion::V2) {
11323            let len = __tmp.len();
11324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11325        } else {
11326            __tmp.len()
11327        }
11328    }
11329}
11330#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11331#[doc = ""]
11332#[doc = "ID: 410"]
11333#[derive(Debug, Clone, PartialEq)]
11334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11336#[cfg_attr(feature = "ts", derive(TS))]
11337#[cfg_attr(feature = "ts", ts(export))]
11338pub struct EVENT_DATA {
11339    #[doc = "Event ID (as defined in the component metadata)"]
11340    pub id: u32,
11341    #[doc = "Timestamp (time since system boot when the event happened)."]
11342    pub event_time_boot_ms: u32,
11343    #[doc = "Sequence number."]
11344    pub sequence: u16,
11345    #[doc = "Component ID"]
11346    pub destination_component: u8,
11347    #[doc = "System ID"]
11348    pub destination_system: u8,
11349    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11350    pub log_levels: u8,
11351    #[doc = "Arguments (depend on event ID)."]
11352    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11353    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11354    pub arguments: [u8; 40],
11355}
11356impl EVENT_DATA {
11357    pub const ENCODED_LEN: usize = 53usize;
11358    pub const DEFAULT: Self = Self {
11359        id: 0_u32,
11360        event_time_boot_ms: 0_u32,
11361        sequence: 0_u16,
11362        destination_component: 0_u8,
11363        destination_system: 0_u8,
11364        log_levels: 0_u8,
11365        arguments: [0_u8; 40usize],
11366    };
11367    #[cfg(feature = "arbitrary")]
11368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11369        use arbitrary::{Arbitrary, Unstructured};
11370        let mut buf = [0u8; 1024];
11371        rng.fill_bytes(&mut buf);
11372        let mut unstructured = Unstructured::new(&buf);
11373        Self::arbitrary(&mut unstructured).unwrap_or_default()
11374    }
11375}
11376impl Default for EVENT_DATA {
11377    fn default() -> Self {
11378        Self::DEFAULT.clone()
11379    }
11380}
11381impl MessageData for EVENT_DATA {
11382    type Message = MavMessage;
11383    const ID: u32 = 410u32;
11384    const NAME: &'static str = "EVENT";
11385    const EXTRA_CRC: u8 = 160u8;
11386    const ENCODED_LEN: usize = 53usize;
11387    fn deser(
11388        _version: MavlinkVersion,
11389        __input: &[u8],
11390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11391        let avail_len = __input.len();
11392        let mut payload_buf = [0; Self::ENCODED_LEN];
11393        let mut buf = if avail_len < Self::ENCODED_LEN {
11394            payload_buf[0..avail_len].copy_from_slice(__input);
11395            Bytes::new(&payload_buf)
11396        } else {
11397            Bytes::new(__input)
11398        };
11399        let mut __struct = Self::default();
11400        __struct.id = buf.get_u32_le();
11401        __struct.event_time_boot_ms = buf.get_u32_le();
11402        __struct.sequence = buf.get_u16_le();
11403        __struct.destination_component = buf.get_u8();
11404        __struct.destination_system = buf.get_u8();
11405        __struct.log_levels = buf.get_u8();
11406        for v in &mut __struct.arguments {
11407            let val = buf.get_u8();
11408            *v = val;
11409        }
11410        Ok(__struct)
11411    }
11412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11413        let mut __tmp = BytesMut::new(bytes);
11414        #[allow(clippy::absurd_extreme_comparisons)]
11415        #[allow(unused_comparisons)]
11416        if __tmp.remaining() < Self::ENCODED_LEN {
11417            panic!(
11418                "buffer is too small (need {} bytes, but got {})",
11419                Self::ENCODED_LEN,
11420                __tmp.remaining(),
11421            )
11422        }
11423        __tmp.put_u32_le(self.id);
11424        __tmp.put_u32_le(self.event_time_boot_ms);
11425        __tmp.put_u16_le(self.sequence);
11426        __tmp.put_u8(self.destination_component);
11427        __tmp.put_u8(self.destination_system);
11428        __tmp.put_u8(self.log_levels);
11429        for val in &self.arguments {
11430            __tmp.put_u8(*val);
11431        }
11432        if matches!(version, MavlinkVersion::V2) {
11433            let len = __tmp.len();
11434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11435        } else {
11436            __tmp.len()
11437        }
11438    }
11439}
11440#[doc = "Provides state for additional features."]
11441#[doc = ""]
11442#[doc = "ID: 245"]
11443#[derive(Debug, Clone, PartialEq)]
11444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11446#[cfg_attr(feature = "ts", derive(TS))]
11447#[cfg_attr(feature = "ts", ts(export))]
11448pub struct EXTENDED_SYS_STATE_DATA {
11449    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11450    pub vtol_state: MavVtolState,
11451    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11452    pub landed_state: MavLandedState,
11453}
11454impl EXTENDED_SYS_STATE_DATA {
11455    pub const ENCODED_LEN: usize = 2usize;
11456    pub const DEFAULT: Self = Self {
11457        vtol_state: MavVtolState::DEFAULT,
11458        landed_state: MavLandedState::DEFAULT,
11459    };
11460    #[cfg(feature = "arbitrary")]
11461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11462        use arbitrary::{Arbitrary, Unstructured};
11463        let mut buf = [0u8; 1024];
11464        rng.fill_bytes(&mut buf);
11465        let mut unstructured = Unstructured::new(&buf);
11466        Self::arbitrary(&mut unstructured).unwrap_or_default()
11467    }
11468}
11469impl Default for EXTENDED_SYS_STATE_DATA {
11470    fn default() -> Self {
11471        Self::DEFAULT.clone()
11472    }
11473}
11474impl MessageData for EXTENDED_SYS_STATE_DATA {
11475    type Message = MavMessage;
11476    const ID: u32 = 245u32;
11477    const NAME: &'static str = "EXTENDED_SYS_STATE";
11478    const EXTRA_CRC: u8 = 130u8;
11479    const ENCODED_LEN: usize = 2usize;
11480    fn deser(
11481        _version: MavlinkVersion,
11482        __input: &[u8],
11483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11484        let avail_len = __input.len();
11485        let mut payload_buf = [0; Self::ENCODED_LEN];
11486        let mut buf = if avail_len < Self::ENCODED_LEN {
11487            payload_buf[0..avail_len].copy_from_slice(__input);
11488            Bytes::new(&payload_buf)
11489        } else {
11490            Bytes::new(__input)
11491        };
11492        let mut __struct = Self::default();
11493        let tmp = buf.get_u8();
11494        __struct.vtol_state =
11495            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11496                enum_type: "MavVtolState",
11497                value: tmp as u32,
11498            })?;
11499        let tmp = buf.get_u8();
11500        __struct.landed_state =
11501            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11502                enum_type: "MavLandedState",
11503                value: tmp as u32,
11504            })?;
11505        Ok(__struct)
11506    }
11507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11508        let mut __tmp = BytesMut::new(bytes);
11509        #[allow(clippy::absurd_extreme_comparisons)]
11510        #[allow(unused_comparisons)]
11511        if __tmp.remaining() < Self::ENCODED_LEN {
11512            panic!(
11513                "buffer is too small (need {} bytes, but got {})",
11514                Self::ENCODED_LEN,
11515                __tmp.remaining(),
11516            )
11517        }
11518        __tmp.put_u8(self.vtol_state as u8);
11519        __tmp.put_u8(self.landed_state as u8);
11520        if matches!(version, MavlinkVersion::V2) {
11521            let len = __tmp.len();
11522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11523        } else {
11524            __tmp.len()
11525        }
11526    }
11527}
11528#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11529#[doc = ""]
11530#[doc = "ID: 162"]
11531#[derive(Debug, Clone, PartialEq)]
11532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11534#[cfg_attr(feature = "ts", derive(TS))]
11535#[cfg_attr(feature = "ts", ts(export))]
11536pub struct FENCE_STATUS_DATA {
11537    #[doc = "Time (since boot) of last breach."]
11538    pub breach_time: u32,
11539    #[doc = "Number of fence breaches."]
11540    pub breach_count: u16,
11541    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11542    pub breach_status: u8,
11543    #[doc = "Last breach type."]
11544    pub breach_type: FenceBreach,
11545    #[doc = "Active action to prevent fence breach"]
11546    #[cfg_attr(feature = "serde", serde(default))]
11547    pub breach_mitigation: FenceMitigate,
11548}
11549impl FENCE_STATUS_DATA {
11550    pub const ENCODED_LEN: usize = 9usize;
11551    pub const DEFAULT: Self = Self {
11552        breach_time: 0_u32,
11553        breach_count: 0_u16,
11554        breach_status: 0_u8,
11555        breach_type: FenceBreach::DEFAULT,
11556        breach_mitigation: FenceMitigate::DEFAULT,
11557    };
11558    #[cfg(feature = "arbitrary")]
11559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11560        use arbitrary::{Arbitrary, Unstructured};
11561        let mut buf = [0u8; 1024];
11562        rng.fill_bytes(&mut buf);
11563        let mut unstructured = Unstructured::new(&buf);
11564        Self::arbitrary(&mut unstructured).unwrap_or_default()
11565    }
11566}
11567impl Default for FENCE_STATUS_DATA {
11568    fn default() -> Self {
11569        Self::DEFAULT.clone()
11570    }
11571}
11572impl MessageData for FENCE_STATUS_DATA {
11573    type Message = MavMessage;
11574    const ID: u32 = 162u32;
11575    const NAME: &'static str = "FENCE_STATUS";
11576    const EXTRA_CRC: u8 = 189u8;
11577    const ENCODED_LEN: usize = 9usize;
11578    fn deser(
11579        _version: MavlinkVersion,
11580        __input: &[u8],
11581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11582        let avail_len = __input.len();
11583        let mut payload_buf = [0; Self::ENCODED_LEN];
11584        let mut buf = if avail_len < Self::ENCODED_LEN {
11585            payload_buf[0..avail_len].copy_from_slice(__input);
11586            Bytes::new(&payload_buf)
11587        } else {
11588            Bytes::new(__input)
11589        };
11590        let mut __struct = Self::default();
11591        __struct.breach_time = buf.get_u32_le();
11592        __struct.breach_count = buf.get_u16_le();
11593        __struct.breach_status = buf.get_u8();
11594        let tmp = buf.get_u8();
11595        __struct.breach_type =
11596            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11597                enum_type: "FenceBreach",
11598                value: tmp as u32,
11599            })?;
11600        let tmp = buf.get_u8();
11601        __struct.breach_mitigation =
11602            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11603                enum_type: "FenceMitigate",
11604                value: tmp as u32,
11605            })?;
11606        Ok(__struct)
11607    }
11608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11609        let mut __tmp = BytesMut::new(bytes);
11610        #[allow(clippy::absurd_extreme_comparisons)]
11611        #[allow(unused_comparisons)]
11612        if __tmp.remaining() < Self::ENCODED_LEN {
11613            panic!(
11614                "buffer is too small (need {} bytes, but got {})",
11615                Self::ENCODED_LEN,
11616                __tmp.remaining(),
11617            )
11618        }
11619        __tmp.put_u32_le(self.breach_time);
11620        __tmp.put_u16_le(self.breach_count);
11621        __tmp.put_u8(self.breach_status);
11622        __tmp.put_u8(self.breach_type as u8);
11623        if matches!(version, MavlinkVersion::V2) {
11624            __tmp.put_u8(self.breach_mitigation as u8);
11625            let len = __tmp.len();
11626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11627        } else {
11628            __tmp.len()
11629        }
11630    }
11631}
11632#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11633#[doc = ""]
11634#[doc = "ID: 110"]
11635#[derive(Debug, Clone, PartialEq)]
11636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11638#[cfg_attr(feature = "ts", derive(TS))]
11639#[cfg_attr(feature = "ts", ts(export))]
11640pub struct FILE_TRANSFER_PROTOCOL_DATA {
11641    #[doc = "Network ID (0 for broadcast)"]
11642    pub target_network: u8,
11643    #[doc = "System ID (0 for broadcast)"]
11644    pub target_system: u8,
11645    #[doc = "Component ID (0 for broadcast)"]
11646    pub target_component: u8,
11647    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11648    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11649    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11650    pub payload: [u8; 251],
11651}
11652impl FILE_TRANSFER_PROTOCOL_DATA {
11653    pub const ENCODED_LEN: usize = 254usize;
11654    pub const DEFAULT: Self = Self {
11655        target_network: 0_u8,
11656        target_system: 0_u8,
11657        target_component: 0_u8,
11658        payload: [0_u8; 251usize],
11659    };
11660    #[cfg(feature = "arbitrary")]
11661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11662        use arbitrary::{Arbitrary, Unstructured};
11663        let mut buf = [0u8; 1024];
11664        rng.fill_bytes(&mut buf);
11665        let mut unstructured = Unstructured::new(&buf);
11666        Self::arbitrary(&mut unstructured).unwrap_or_default()
11667    }
11668}
11669impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11670    fn default() -> Self {
11671        Self::DEFAULT.clone()
11672    }
11673}
11674impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11675    type Message = MavMessage;
11676    const ID: u32 = 110u32;
11677    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11678    const EXTRA_CRC: u8 = 84u8;
11679    const ENCODED_LEN: usize = 254usize;
11680    fn deser(
11681        _version: MavlinkVersion,
11682        __input: &[u8],
11683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11684        let avail_len = __input.len();
11685        let mut payload_buf = [0; Self::ENCODED_LEN];
11686        let mut buf = if avail_len < Self::ENCODED_LEN {
11687            payload_buf[0..avail_len].copy_from_slice(__input);
11688            Bytes::new(&payload_buf)
11689        } else {
11690            Bytes::new(__input)
11691        };
11692        let mut __struct = Self::default();
11693        __struct.target_network = buf.get_u8();
11694        __struct.target_system = buf.get_u8();
11695        __struct.target_component = buf.get_u8();
11696        for v in &mut __struct.payload {
11697            let val = buf.get_u8();
11698            *v = val;
11699        }
11700        Ok(__struct)
11701    }
11702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11703        let mut __tmp = BytesMut::new(bytes);
11704        #[allow(clippy::absurd_extreme_comparisons)]
11705        #[allow(unused_comparisons)]
11706        if __tmp.remaining() < Self::ENCODED_LEN {
11707            panic!(
11708                "buffer is too small (need {} bytes, but got {})",
11709                Self::ENCODED_LEN,
11710                __tmp.remaining(),
11711            )
11712        }
11713        __tmp.put_u8(self.target_network);
11714        __tmp.put_u8(self.target_system);
11715        __tmp.put_u8(self.target_component);
11716        for val in &self.payload {
11717            __tmp.put_u8(*val);
11718        }
11719        if matches!(version, MavlinkVersion::V2) {
11720            let len = __tmp.len();
11721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11722        } else {
11723            __tmp.len()
11724        }
11725    }
11726}
11727#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11728#[doc = ""]
11729#[doc = "ID: 264"]
11730#[derive(Debug, Clone, PartialEq)]
11731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11733#[cfg_attr(feature = "ts", derive(TS))]
11734#[cfg_attr(feature = "ts", ts(export))]
11735pub struct FLIGHT_INFORMATION_DATA {
11736    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11737    pub arming_time_utc: u64,
11738    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11739    pub takeoff_time_utc: u64,
11740    #[doc = "Flight number. Note, field is misnamed UUID."]
11741    pub flight_uuid: u64,
11742    #[doc = "Timestamp (time since system boot)."]
11743    pub time_boot_ms: u32,
11744    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11745    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11746    pub landing_time: u32,
11747}
11748impl FLIGHT_INFORMATION_DATA {
11749    pub const ENCODED_LEN: usize = 32usize;
11750    pub const DEFAULT: Self = Self {
11751        arming_time_utc: 0_u64,
11752        takeoff_time_utc: 0_u64,
11753        flight_uuid: 0_u64,
11754        time_boot_ms: 0_u32,
11755        landing_time: 0_u32,
11756    };
11757    #[cfg(feature = "arbitrary")]
11758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11759        use arbitrary::{Arbitrary, Unstructured};
11760        let mut buf = [0u8; 1024];
11761        rng.fill_bytes(&mut buf);
11762        let mut unstructured = Unstructured::new(&buf);
11763        Self::arbitrary(&mut unstructured).unwrap_or_default()
11764    }
11765}
11766impl Default for FLIGHT_INFORMATION_DATA {
11767    fn default() -> Self {
11768        Self::DEFAULT.clone()
11769    }
11770}
11771impl MessageData for FLIGHT_INFORMATION_DATA {
11772    type Message = MavMessage;
11773    const ID: u32 = 264u32;
11774    const NAME: &'static str = "FLIGHT_INFORMATION";
11775    const EXTRA_CRC: u8 = 49u8;
11776    const ENCODED_LEN: usize = 32usize;
11777    fn deser(
11778        _version: MavlinkVersion,
11779        __input: &[u8],
11780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11781        let avail_len = __input.len();
11782        let mut payload_buf = [0; Self::ENCODED_LEN];
11783        let mut buf = if avail_len < Self::ENCODED_LEN {
11784            payload_buf[0..avail_len].copy_from_slice(__input);
11785            Bytes::new(&payload_buf)
11786        } else {
11787            Bytes::new(__input)
11788        };
11789        let mut __struct = Self::default();
11790        __struct.arming_time_utc = buf.get_u64_le();
11791        __struct.takeoff_time_utc = buf.get_u64_le();
11792        __struct.flight_uuid = buf.get_u64_le();
11793        __struct.time_boot_ms = buf.get_u32_le();
11794        __struct.landing_time = buf.get_u32_le();
11795        Ok(__struct)
11796    }
11797    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11798        let mut __tmp = BytesMut::new(bytes);
11799        #[allow(clippy::absurd_extreme_comparisons)]
11800        #[allow(unused_comparisons)]
11801        if __tmp.remaining() < Self::ENCODED_LEN {
11802            panic!(
11803                "buffer is too small (need {} bytes, but got {})",
11804                Self::ENCODED_LEN,
11805                __tmp.remaining(),
11806            )
11807        }
11808        __tmp.put_u64_le(self.arming_time_utc);
11809        __tmp.put_u64_le(self.takeoff_time_utc);
11810        __tmp.put_u64_le(self.flight_uuid);
11811        __tmp.put_u32_le(self.time_boot_ms);
11812        if matches!(version, MavlinkVersion::V2) {
11813            __tmp.put_u32_le(self.landing_time);
11814            let len = __tmp.len();
11815            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11816        } else {
11817            __tmp.len()
11818        }
11819    }
11820}
11821#[doc = "Current motion information from a designated system."]
11822#[doc = ""]
11823#[doc = "ID: 144"]
11824#[derive(Debug, Clone, PartialEq)]
11825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11827#[cfg_attr(feature = "ts", derive(TS))]
11828#[cfg_attr(feature = "ts", ts(export))]
11829pub struct FOLLOW_TARGET_DATA {
11830    #[doc = "Timestamp (time since system boot)."]
11831    pub timestamp: u64,
11832    #[doc = "button states or switches of a tracker device"]
11833    pub custom_state: u64,
11834    #[doc = "Latitude (WGS84)"]
11835    pub lat: i32,
11836    #[doc = "Longitude (WGS84)"]
11837    pub lon: i32,
11838    #[doc = "Altitude (MSL)"]
11839    pub alt: f32,
11840    #[doc = "target velocity (0,0,0) for unknown"]
11841    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11842    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11843    pub vel: [f32; 3],
11844    #[doc = "linear target acceleration (0,0,0) for unknown"]
11845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11846    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11847    pub acc: [f32; 3],
11848    #[doc = "(0 0 0 0 for unknown)"]
11849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11850    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11851    pub attitude_q: [f32; 4],
11852    #[doc = "(0 0 0 for unknown)"]
11853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11854    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11855    pub rates: [f32; 3],
11856    #[doc = "eph epv"]
11857    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11858    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11859    pub position_cov: [f32; 3],
11860    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11861    pub est_capabilities: u8,
11862}
11863impl FOLLOW_TARGET_DATA {
11864    pub const ENCODED_LEN: usize = 93usize;
11865    pub const DEFAULT: Self = Self {
11866        timestamp: 0_u64,
11867        custom_state: 0_u64,
11868        lat: 0_i32,
11869        lon: 0_i32,
11870        alt: 0.0_f32,
11871        vel: [0.0_f32; 3usize],
11872        acc: [0.0_f32; 3usize],
11873        attitude_q: [0.0_f32; 4usize],
11874        rates: [0.0_f32; 3usize],
11875        position_cov: [0.0_f32; 3usize],
11876        est_capabilities: 0_u8,
11877    };
11878    #[cfg(feature = "arbitrary")]
11879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11880        use arbitrary::{Arbitrary, Unstructured};
11881        let mut buf = [0u8; 1024];
11882        rng.fill_bytes(&mut buf);
11883        let mut unstructured = Unstructured::new(&buf);
11884        Self::arbitrary(&mut unstructured).unwrap_or_default()
11885    }
11886}
11887impl Default for FOLLOW_TARGET_DATA {
11888    fn default() -> Self {
11889        Self::DEFAULT.clone()
11890    }
11891}
11892impl MessageData for FOLLOW_TARGET_DATA {
11893    type Message = MavMessage;
11894    const ID: u32 = 144u32;
11895    const NAME: &'static str = "FOLLOW_TARGET";
11896    const EXTRA_CRC: u8 = 127u8;
11897    const ENCODED_LEN: usize = 93usize;
11898    fn deser(
11899        _version: MavlinkVersion,
11900        __input: &[u8],
11901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11902        let avail_len = __input.len();
11903        let mut payload_buf = [0; Self::ENCODED_LEN];
11904        let mut buf = if avail_len < Self::ENCODED_LEN {
11905            payload_buf[0..avail_len].copy_from_slice(__input);
11906            Bytes::new(&payload_buf)
11907        } else {
11908            Bytes::new(__input)
11909        };
11910        let mut __struct = Self::default();
11911        __struct.timestamp = buf.get_u64_le();
11912        __struct.custom_state = buf.get_u64_le();
11913        __struct.lat = buf.get_i32_le();
11914        __struct.lon = buf.get_i32_le();
11915        __struct.alt = buf.get_f32_le();
11916        for v in &mut __struct.vel {
11917            let val = buf.get_f32_le();
11918            *v = val;
11919        }
11920        for v in &mut __struct.acc {
11921            let val = buf.get_f32_le();
11922            *v = val;
11923        }
11924        for v in &mut __struct.attitude_q {
11925            let val = buf.get_f32_le();
11926            *v = val;
11927        }
11928        for v in &mut __struct.rates {
11929            let val = buf.get_f32_le();
11930            *v = val;
11931        }
11932        for v in &mut __struct.position_cov {
11933            let val = buf.get_f32_le();
11934            *v = val;
11935        }
11936        __struct.est_capabilities = buf.get_u8();
11937        Ok(__struct)
11938    }
11939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11940        let mut __tmp = BytesMut::new(bytes);
11941        #[allow(clippy::absurd_extreme_comparisons)]
11942        #[allow(unused_comparisons)]
11943        if __tmp.remaining() < Self::ENCODED_LEN {
11944            panic!(
11945                "buffer is too small (need {} bytes, but got {})",
11946                Self::ENCODED_LEN,
11947                __tmp.remaining(),
11948            )
11949        }
11950        __tmp.put_u64_le(self.timestamp);
11951        __tmp.put_u64_le(self.custom_state);
11952        __tmp.put_i32_le(self.lat);
11953        __tmp.put_i32_le(self.lon);
11954        __tmp.put_f32_le(self.alt);
11955        for val in &self.vel {
11956            __tmp.put_f32_le(*val);
11957        }
11958        for val in &self.acc {
11959            __tmp.put_f32_le(*val);
11960        }
11961        for val in &self.attitude_q {
11962            __tmp.put_f32_le(*val);
11963        }
11964        for val in &self.rates {
11965            __tmp.put_f32_le(*val);
11966        }
11967        for val in &self.position_cov {
11968            __tmp.put_f32_le(*val);
11969        }
11970        __tmp.put_u8(self.est_capabilities);
11971        if matches!(version, MavlinkVersion::V2) {
11972            let len = __tmp.len();
11973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11974        } else {
11975            __tmp.len()
11976        }
11977    }
11978}
11979#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11980#[doc = ""]
11981#[doc = "ID: 371"]
11982#[derive(Debug, Clone, PartialEq)]
11983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11985#[cfg_attr(feature = "ts", derive(TS))]
11986#[cfg_attr(feature = "ts", ts(export))]
11987pub struct FUEL_STATUS_DATA {
11988    #[doc = "Capacity when full. Must be provided."]
11989    pub maximum_fuel: f32,
11990    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11991    pub consumed_fuel: f32,
11992    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11993    pub remaining_fuel: f32,
11994    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11995    pub flow_rate: f32,
11996    #[doc = "Fuel temperature. NaN: field not provided."]
11997    pub temperature: f32,
11998    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
11999    pub fuel_type: MavFuelType,
12000    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12001    pub id: u8,
12002    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12003    pub percent_remaining: u8,
12004}
12005impl FUEL_STATUS_DATA {
12006    pub const ENCODED_LEN: usize = 26usize;
12007    pub const DEFAULT: Self = Self {
12008        maximum_fuel: 0.0_f32,
12009        consumed_fuel: 0.0_f32,
12010        remaining_fuel: 0.0_f32,
12011        flow_rate: 0.0_f32,
12012        temperature: 0.0_f32,
12013        fuel_type: MavFuelType::DEFAULT,
12014        id: 0_u8,
12015        percent_remaining: 0_u8,
12016    };
12017    #[cfg(feature = "arbitrary")]
12018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12019        use arbitrary::{Arbitrary, Unstructured};
12020        let mut buf = [0u8; 1024];
12021        rng.fill_bytes(&mut buf);
12022        let mut unstructured = Unstructured::new(&buf);
12023        Self::arbitrary(&mut unstructured).unwrap_or_default()
12024    }
12025}
12026impl Default for FUEL_STATUS_DATA {
12027    fn default() -> Self {
12028        Self::DEFAULT.clone()
12029    }
12030}
12031impl MessageData for FUEL_STATUS_DATA {
12032    type Message = MavMessage;
12033    const ID: u32 = 371u32;
12034    const NAME: &'static str = "FUEL_STATUS";
12035    const EXTRA_CRC: u8 = 10u8;
12036    const ENCODED_LEN: usize = 26usize;
12037    fn deser(
12038        _version: MavlinkVersion,
12039        __input: &[u8],
12040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12041        let avail_len = __input.len();
12042        let mut payload_buf = [0; Self::ENCODED_LEN];
12043        let mut buf = if avail_len < Self::ENCODED_LEN {
12044            payload_buf[0..avail_len].copy_from_slice(__input);
12045            Bytes::new(&payload_buf)
12046        } else {
12047            Bytes::new(__input)
12048        };
12049        let mut __struct = Self::default();
12050        __struct.maximum_fuel = buf.get_f32_le();
12051        __struct.consumed_fuel = buf.get_f32_le();
12052        __struct.remaining_fuel = buf.get_f32_le();
12053        __struct.flow_rate = buf.get_f32_le();
12054        __struct.temperature = buf.get_f32_le();
12055        let tmp = buf.get_u32_le();
12056        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12057            ::mavlink_core::error::ParserError::InvalidEnum {
12058                enum_type: "MavFuelType",
12059                value: tmp as u32,
12060            },
12061        )?;
12062        __struct.id = buf.get_u8();
12063        __struct.percent_remaining = buf.get_u8();
12064        Ok(__struct)
12065    }
12066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12067        let mut __tmp = BytesMut::new(bytes);
12068        #[allow(clippy::absurd_extreme_comparisons)]
12069        #[allow(unused_comparisons)]
12070        if __tmp.remaining() < Self::ENCODED_LEN {
12071            panic!(
12072                "buffer is too small (need {} bytes, but got {})",
12073                Self::ENCODED_LEN,
12074                __tmp.remaining(),
12075            )
12076        }
12077        __tmp.put_f32_le(self.maximum_fuel);
12078        __tmp.put_f32_le(self.consumed_fuel);
12079        __tmp.put_f32_le(self.remaining_fuel);
12080        __tmp.put_f32_le(self.flow_rate);
12081        __tmp.put_f32_le(self.temperature);
12082        __tmp.put_u32_le(self.fuel_type as u32);
12083        __tmp.put_u8(self.id);
12084        __tmp.put_u8(self.percent_remaining);
12085        if matches!(version, MavlinkVersion::V2) {
12086            let len = __tmp.len();
12087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12088        } else {
12089            __tmp.len()
12090        }
12091    }
12092}
12093#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12094#[doc = ""]
12095#[doc = "ID: 373"]
12096#[derive(Debug, Clone, PartialEq)]
12097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12099#[cfg_attr(feature = "ts", derive(TS))]
12100#[cfg_attr(feature = "ts", ts(export))]
12101pub struct GENERATOR_STATUS_DATA {
12102    #[doc = "Status flags."]
12103    pub status: MavGeneratorStatusFlag,
12104    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12105    pub battery_current: f32,
12106    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12107    pub load_current: f32,
12108    #[doc = "The power being generated. NaN: field not provided"]
12109    pub power_generated: f32,
12110    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12111    pub bus_voltage: f32,
12112    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12113    pub bat_current_setpoint: f32,
12114    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12115    pub runtime: u32,
12116    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12117    pub time_until_maintenance: i32,
12118    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12119    pub generator_speed: u16,
12120    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12121    pub rectifier_temperature: i16,
12122    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12123    pub generator_temperature: i16,
12124}
12125impl GENERATOR_STATUS_DATA {
12126    pub const ENCODED_LEN: usize = 42usize;
12127    pub const DEFAULT: Self = Self {
12128        status: MavGeneratorStatusFlag::DEFAULT,
12129        battery_current: 0.0_f32,
12130        load_current: 0.0_f32,
12131        power_generated: 0.0_f32,
12132        bus_voltage: 0.0_f32,
12133        bat_current_setpoint: 0.0_f32,
12134        runtime: 0_u32,
12135        time_until_maintenance: 0_i32,
12136        generator_speed: 0_u16,
12137        rectifier_temperature: 0_i16,
12138        generator_temperature: 0_i16,
12139    };
12140    #[cfg(feature = "arbitrary")]
12141    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12142        use arbitrary::{Arbitrary, Unstructured};
12143        let mut buf = [0u8; 1024];
12144        rng.fill_bytes(&mut buf);
12145        let mut unstructured = Unstructured::new(&buf);
12146        Self::arbitrary(&mut unstructured).unwrap_or_default()
12147    }
12148}
12149impl Default for GENERATOR_STATUS_DATA {
12150    fn default() -> Self {
12151        Self::DEFAULT.clone()
12152    }
12153}
12154impl MessageData for GENERATOR_STATUS_DATA {
12155    type Message = MavMessage;
12156    const ID: u32 = 373u32;
12157    const NAME: &'static str = "GENERATOR_STATUS";
12158    const EXTRA_CRC: u8 = 117u8;
12159    const ENCODED_LEN: usize = 42usize;
12160    fn deser(
12161        _version: MavlinkVersion,
12162        __input: &[u8],
12163    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12164        let avail_len = __input.len();
12165        let mut payload_buf = [0; Self::ENCODED_LEN];
12166        let mut buf = if avail_len < Self::ENCODED_LEN {
12167            payload_buf[0..avail_len].copy_from_slice(__input);
12168            Bytes::new(&payload_buf)
12169        } else {
12170            Bytes::new(__input)
12171        };
12172        let mut __struct = Self::default();
12173        let tmp = buf.get_u64_le();
12174        __struct.status = MavGeneratorStatusFlag::from_bits(
12175            tmp & MavGeneratorStatusFlag::all().bits(),
12176        )
12177        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12178            flag_type: "MavGeneratorStatusFlag",
12179            value: tmp as u32,
12180        })?;
12181        __struct.battery_current = buf.get_f32_le();
12182        __struct.load_current = buf.get_f32_le();
12183        __struct.power_generated = buf.get_f32_le();
12184        __struct.bus_voltage = buf.get_f32_le();
12185        __struct.bat_current_setpoint = buf.get_f32_le();
12186        __struct.runtime = buf.get_u32_le();
12187        __struct.time_until_maintenance = buf.get_i32_le();
12188        __struct.generator_speed = buf.get_u16_le();
12189        __struct.rectifier_temperature = buf.get_i16_le();
12190        __struct.generator_temperature = buf.get_i16_le();
12191        Ok(__struct)
12192    }
12193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12194        let mut __tmp = BytesMut::new(bytes);
12195        #[allow(clippy::absurd_extreme_comparisons)]
12196        #[allow(unused_comparisons)]
12197        if __tmp.remaining() < Self::ENCODED_LEN {
12198            panic!(
12199                "buffer is too small (need {} bytes, but got {})",
12200                Self::ENCODED_LEN,
12201                __tmp.remaining(),
12202            )
12203        }
12204        __tmp.put_u64_le(self.status.bits());
12205        __tmp.put_f32_le(self.battery_current);
12206        __tmp.put_f32_le(self.load_current);
12207        __tmp.put_f32_le(self.power_generated);
12208        __tmp.put_f32_le(self.bus_voltage);
12209        __tmp.put_f32_le(self.bat_current_setpoint);
12210        __tmp.put_u32_le(self.runtime);
12211        __tmp.put_i32_le(self.time_until_maintenance);
12212        __tmp.put_u16_le(self.generator_speed);
12213        __tmp.put_i16_le(self.rectifier_temperature);
12214        __tmp.put_i16_le(self.generator_temperature);
12215        if matches!(version, MavlinkVersion::V2) {
12216            let len = __tmp.len();
12217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12218        } else {
12219            __tmp.len()
12220        }
12221    }
12222}
12223#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12224#[doc = ""]
12225#[doc = "ID: 285"]
12226#[derive(Debug, Clone, PartialEq)]
12227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12229#[cfg_attr(feature = "ts", derive(TS))]
12230#[cfg_attr(feature = "ts", ts(export))]
12231pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12232    #[doc = "Timestamp (time since system boot)."]
12233    pub time_boot_ms: u32,
12234    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12235    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12236    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12237    pub q: [f32; 4],
12238    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12239    pub angular_velocity_x: f32,
12240    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12241    pub angular_velocity_y: f32,
12242    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12243    pub angular_velocity_z: f32,
12244    #[doc = "Failure flags (0 for no failure)"]
12245    pub failure_flags: GimbalDeviceErrorFlags,
12246    #[doc = "Current gimbal flags set."]
12247    pub flags: GimbalDeviceFlags,
12248    #[doc = "System ID"]
12249    pub target_system: u8,
12250    #[doc = "Component ID"]
12251    pub target_component: u8,
12252    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12253    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12254    pub delta_yaw: f32,
12255    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12256    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12257    pub delta_yaw_velocity: f32,
12258    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12260    pub gimbal_device_id: u8,
12261}
12262impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12263    pub const ENCODED_LEN: usize = 49usize;
12264    pub const DEFAULT: Self = Self {
12265        time_boot_ms: 0_u32,
12266        q: [0.0_f32; 4usize],
12267        angular_velocity_x: 0.0_f32,
12268        angular_velocity_y: 0.0_f32,
12269        angular_velocity_z: 0.0_f32,
12270        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12271        flags: GimbalDeviceFlags::DEFAULT,
12272        target_system: 0_u8,
12273        target_component: 0_u8,
12274        delta_yaw: 0.0_f32,
12275        delta_yaw_velocity: 0.0_f32,
12276        gimbal_device_id: 0_u8,
12277    };
12278    #[cfg(feature = "arbitrary")]
12279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12280        use arbitrary::{Arbitrary, Unstructured};
12281        let mut buf = [0u8; 1024];
12282        rng.fill_bytes(&mut buf);
12283        let mut unstructured = Unstructured::new(&buf);
12284        Self::arbitrary(&mut unstructured).unwrap_or_default()
12285    }
12286}
12287impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12288    fn default() -> Self {
12289        Self::DEFAULT.clone()
12290    }
12291}
12292impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12293    type Message = MavMessage;
12294    const ID: u32 = 285u32;
12295    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12296    const EXTRA_CRC: u8 = 137u8;
12297    const ENCODED_LEN: usize = 49usize;
12298    fn deser(
12299        _version: MavlinkVersion,
12300        __input: &[u8],
12301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12302        let avail_len = __input.len();
12303        let mut payload_buf = [0; Self::ENCODED_LEN];
12304        let mut buf = if avail_len < Self::ENCODED_LEN {
12305            payload_buf[0..avail_len].copy_from_slice(__input);
12306            Bytes::new(&payload_buf)
12307        } else {
12308            Bytes::new(__input)
12309        };
12310        let mut __struct = Self::default();
12311        __struct.time_boot_ms = buf.get_u32_le();
12312        for v in &mut __struct.q {
12313            let val = buf.get_f32_le();
12314            *v = val;
12315        }
12316        __struct.angular_velocity_x = buf.get_f32_le();
12317        __struct.angular_velocity_y = buf.get_f32_le();
12318        __struct.angular_velocity_z = buf.get_f32_le();
12319        let tmp = buf.get_u32_le();
12320        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12321            tmp & GimbalDeviceErrorFlags::all().bits(),
12322        )
12323        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12324            flag_type: "GimbalDeviceErrorFlags",
12325            value: tmp as u32,
12326        })?;
12327        let tmp = buf.get_u16_le();
12328        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12329            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12330                flag_type: "GimbalDeviceFlags",
12331                value: tmp as u32,
12332            })?;
12333        __struct.target_system = buf.get_u8();
12334        __struct.target_component = buf.get_u8();
12335        __struct.delta_yaw = buf.get_f32_le();
12336        __struct.delta_yaw_velocity = buf.get_f32_le();
12337        __struct.gimbal_device_id = buf.get_u8();
12338        Ok(__struct)
12339    }
12340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12341        let mut __tmp = BytesMut::new(bytes);
12342        #[allow(clippy::absurd_extreme_comparisons)]
12343        #[allow(unused_comparisons)]
12344        if __tmp.remaining() < Self::ENCODED_LEN {
12345            panic!(
12346                "buffer is too small (need {} bytes, but got {})",
12347                Self::ENCODED_LEN,
12348                __tmp.remaining(),
12349            )
12350        }
12351        __tmp.put_u32_le(self.time_boot_ms);
12352        for val in &self.q {
12353            __tmp.put_f32_le(*val);
12354        }
12355        __tmp.put_f32_le(self.angular_velocity_x);
12356        __tmp.put_f32_le(self.angular_velocity_y);
12357        __tmp.put_f32_le(self.angular_velocity_z);
12358        __tmp.put_u32_le(self.failure_flags.bits());
12359        __tmp.put_u16_le(self.flags.bits());
12360        __tmp.put_u8(self.target_system);
12361        __tmp.put_u8(self.target_component);
12362        if matches!(version, MavlinkVersion::V2) {
12363            __tmp.put_f32_le(self.delta_yaw);
12364            __tmp.put_f32_le(self.delta_yaw_velocity);
12365            __tmp.put_u8(self.gimbal_device_id);
12366            let len = __tmp.len();
12367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12368        } else {
12369            __tmp.len()
12370        }
12371    }
12372}
12373#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12374#[doc = ""]
12375#[doc = "ID: 283"]
12376#[derive(Debug, Clone, PartialEq)]
12377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12379#[cfg_attr(feature = "ts", derive(TS))]
12380#[cfg_attr(feature = "ts", ts(export))]
12381pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12382    #[doc = "UID of gimbal hardware (0 if unknown)."]
12383    pub uid: u64,
12384    #[doc = "Timestamp (time since system boot)."]
12385    pub time_boot_ms: u32,
12386    #[doc = "0xff)."]
12387    pub firmware_version: u32,
12388    #[doc = "0xff)."]
12389    pub hardware_version: u32,
12390    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12391    pub roll_min: f32,
12392    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12393    pub roll_max: f32,
12394    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12395    pub pitch_min: f32,
12396    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12397    pub pitch_max: f32,
12398    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12399    pub yaw_min: f32,
12400    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12401    pub yaw_max: f32,
12402    #[doc = "Bitmap of gimbal capability flags."]
12403    pub cap_flags: GimbalDeviceCapFlags,
12404    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12405    pub custom_cap_flags: u16,
12406    #[doc = "Name of the gimbal vendor."]
12407    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12408    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12409    pub vendor_name: [u8; 32],
12410    #[doc = "Name of the gimbal model."]
12411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12412    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12413    pub model_name: [u8; 32],
12414    #[doc = "Custom name of the gimbal given to it by the user."]
12415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12416    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12417    pub custom_name: [u8; 32],
12418    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12420    pub gimbal_device_id: u8,
12421}
12422impl GIMBAL_DEVICE_INFORMATION_DATA {
12423    pub const ENCODED_LEN: usize = 145usize;
12424    pub const DEFAULT: Self = Self {
12425        uid: 0_u64,
12426        time_boot_ms: 0_u32,
12427        firmware_version: 0_u32,
12428        hardware_version: 0_u32,
12429        roll_min: 0.0_f32,
12430        roll_max: 0.0_f32,
12431        pitch_min: 0.0_f32,
12432        pitch_max: 0.0_f32,
12433        yaw_min: 0.0_f32,
12434        yaw_max: 0.0_f32,
12435        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12436        custom_cap_flags: 0_u16,
12437        vendor_name: [0_u8; 32usize],
12438        model_name: [0_u8; 32usize],
12439        custom_name: [0_u8; 32usize],
12440        gimbal_device_id: 0_u8,
12441    };
12442    #[cfg(feature = "arbitrary")]
12443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12444        use arbitrary::{Arbitrary, Unstructured};
12445        let mut buf = [0u8; 1024];
12446        rng.fill_bytes(&mut buf);
12447        let mut unstructured = Unstructured::new(&buf);
12448        Self::arbitrary(&mut unstructured).unwrap_or_default()
12449    }
12450}
12451impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12452    fn default() -> Self {
12453        Self::DEFAULT.clone()
12454    }
12455}
12456impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12457    type Message = MavMessage;
12458    const ID: u32 = 283u32;
12459    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12460    const EXTRA_CRC: u8 = 74u8;
12461    const ENCODED_LEN: usize = 145usize;
12462    fn deser(
12463        _version: MavlinkVersion,
12464        __input: &[u8],
12465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12466        let avail_len = __input.len();
12467        let mut payload_buf = [0; Self::ENCODED_LEN];
12468        let mut buf = if avail_len < Self::ENCODED_LEN {
12469            payload_buf[0..avail_len].copy_from_slice(__input);
12470            Bytes::new(&payload_buf)
12471        } else {
12472            Bytes::new(__input)
12473        };
12474        let mut __struct = Self::default();
12475        __struct.uid = buf.get_u64_le();
12476        __struct.time_boot_ms = buf.get_u32_le();
12477        __struct.firmware_version = buf.get_u32_le();
12478        __struct.hardware_version = buf.get_u32_le();
12479        __struct.roll_min = buf.get_f32_le();
12480        __struct.roll_max = buf.get_f32_le();
12481        __struct.pitch_min = buf.get_f32_le();
12482        __struct.pitch_max = buf.get_f32_le();
12483        __struct.yaw_min = buf.get_f32_le();
12484        __struct.yaw_max = buf.get_f32_le();
12485        let tmp = buf.get_u16_le();
12486        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12487            tmp & GimbalDeviceCapFlags::all().bits(),
12488        )
12489        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12490            flag_type: "GimbalDeviceCapFlags",
12491            value: tmp as u32,
12492        })?;
12493        __struct.custom_cap_flags = buf.get_u16_le();
12494        for v in &mut __struct.vendor_name {
12495            let val = buf.get_u8();
12496            *v = val;
12497        }
12498        for v in &mut __struct.model_name {
12499            let val = buf.get_u8();
12500            *v = val;
12501        }
12502        for v in &mut __struct.custom_name {
12503            let val = buf.get_u8();
12504            *v = val;
12505        }
12506        __struct.gimbal_device_id = buf.get_u8();
12507        Ok(__struct)
12508    }
12509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12510        let mut __tmp = BytesMut::new(bytes);
12511        #[allow(clippy::absurd_extreme_comparisons)]
12512        #[allow(unused_comparisons)]
12513        if __tmp.remaining() < Self::ENCODED_LEN {
12514            panic!(
12515                "buffer is too small (need {} bytes, but got {})",
12516                Self::ENCODED_LEN,
12517                __tmp.remaining(),
12518            )
12519        }
12520        __tmp.put_u64_le(self.uid);
12521        __tmp.put_u32_le(self.time_boot_ms);
12522        __tmp.put_u32_le(self.firmware_version);
12523        __tmp.put_u32_le(self.hardware_version);
12524        __tmp.put_f32_le(self.roll_min);
12525        __tmp.put_f32_le(self.roll_max);
12526        __tmp.put_f32_le(self.pitch_min);
12527        __tmp.put_f32_le(self.pitch_max);
12528        __tmp.put_f32_le(self.yaw_min);
12529        __tmp.put_f32_le(self.yaw_max);
12530        __tmp.put_u16_le(self.cap_flags.bits());
12531        __tmp.put_u16_le(self.custom_cap_flags);
12532        for val in &self.vendor_name {
12533            __tmp.put_u8(*val);
12534        }
12535        for val in &self.model_name {
12536            __tmp.put_u8(*val);
12537        }
12538        for val in &self.custom_name {
12539            __tmp.put_u8(*val);
12540        }
12541        if matches!(version, MavlinkVersion::V2) {
12542            __tmp.put_u8(self.gimbal_device_id);
12543            let len = __tmp.len();
12544            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12545        } else {
12546            __tmp.len()
12547        }
12548    }
12549}
12550#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12551#[doc = ""]
12552#[doc = "ID: 284"]
12553#[derive(Debug, Clone, PartialEq)]
12554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12556#[cfg_attr(feature = "ts", derive(TS))]
12557#[cfg_attr(feature = "ts", ts(export))]
12558pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12559    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12561    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12562    pub q: [f32; 4],
12563    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12564    pub angular_velocity_x: f32,
12565    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12566    pub angular_velocity_y: f32,
12567    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12568    pub angular_velocity_z: f32,
12569    #[doc = "Low level gimbal flags."]
12570    pub flags: GimbalDeviceFlags,
12571    #[doc = "System ID"]
12572    pub target_system: u8,
12573    #[doc = "Component ID"]
12574    pub target_component: u8,
12575}
12576impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12577    pub const ENCODED_LEN: usize = 32usize;
12578    pub const DEFAULT: Self = Self {
12579        q: [0.0_f32; 4usize],
12580        angular_velocity_x: 0.0_f32,
12581        angular_velocity_y: 0.0_f32,
12582        angular_velocity_z: 0.0_f32,
12583        flags: GimbalDeviceFlags::DEFAULT,
12584        target_system: 0_u8,
12585        target_component: 0_u8,
12586    };
12587    #[cfg(feature = "arbitrary")]
12588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12589        use arbitrary::{Arbitrary, Unstructured};
12590        let mut buf = [0u8; 1024];
12591        rng.fill_bytes(&mut buf);
12592        let mut unstructured = Unstructured::new(&buf);
12593        Self::arbitrary(&mut unstructured).unwrap_or_default()
12594    }
12595}
12596impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12597    fn default() -> Self {
12598        Self::DEFAULT.clone()
12599    }
12600}
12601impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12602    type Message = MavMessage;
12603    const ID: u32 = 284u32;
12604    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12605    const EXTRA_CRC: u8 = 99u8;
12606    const ENCODED_LEN: usize = 32usize;
12607    fn deser(
12608        _version: MavlinkVersion,
12609        __input: &[u8],
12610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12611        let avail_len = __input.len();
12612        let mut payload_buf = [0; Self::ENCODED_LEN];
12613        let mut buf = if avail_len < Self::ENCODED_LEN {
12614            payload_buf[0..avail_len].copy_from_slice(__input);
12615            Bytes::new(&payload_buf)
12616        } else {
12617            Bytes::new(__input)
12618        };
12619        let mut __struct = Self::default();
12620        for v in &mut __struct.q {
12621            let val = buf.get_f32_le();
12622            *v = val;
12623        }
12624        __struct.angular_velocity_x = buf.get_f32_le();
12625        __struct.angular_velocity_y = buf.get_f32_le();
12626        __struct.angular_velocity_z = buf.get_f32_le();
12627        let tmp = buf.get_u16_le();
12628        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12629            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12630                flag_type: "GimbalDeviceFlags",
12631                value: tmp as u32,
12632            })?;
12633        __struct.target_system = buf.get_u8();
12634        __struct.target_component = buf.get_u8();
12635        Ok(__struct)
12636    }
12637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12638        let mut __tmp = BytesMut::new(bytes);
12639        #[allow(clippy::absurd_extreme_comparisons)]
12640        #[allow(unused_comparisons)]
12641        if __tmp.remaining() < Self::ENCODED_LEN {
12642            panic!(
12643                "buffer is too small (need {} bytes, but got {})",
12644                Self::ENCODED_LEN,
12645                __tmp.remaining(),
12646            )
12647        }
12648        for val in &self.q {
12649            __tmp.put_f32_le(*val);
12650        }
12651        __tmp.put_f32_le(self.angular_velocity_x);
12652        __tmp.put_f32_le(self.angular_velocity_y);
12653        __tmp.put_f32_le(self.angular_velocity_z);
12654        __tmp.put_u16_le(self.flags.bits());
12655        __tmp.put_u8(self.target_system);
12656        __tmp.put_u8(self.target_component);
12657        if matches!(version, MavlinkVersion::V2) {
12658            let len = __tmp.len();
12659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12660        } else {
12661            __tmp.len()
12662        }
12663    }
12664}
12665#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12666#[doc = ""]
12667#[doc = "ID: 280"]
12668#[derive(Debug, Clone, PartialEq)]
12669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12671#[cfg_attr(feature = "ts", derive(TS))]
12672#[cfg_attr(feature = "ts", ts(export))]
12673pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12674    #[doc = "Timestamp (time since system boot)."]
12675    pub time_boot_ms: u32,
12676    #[doc = "Bitmap of gimbal capability flags."]
12677    pub cap_flags: GimbalManagerCapFlags,
12678    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12679    pub roll_min: f32,
12680    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12681    pub roll_max: f32,
12682    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12683    pub pitch_min: f32,
12684    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12685    pub pitch_max: f32,
12686    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12687    pub yaw_min: f32,
12688    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12689    pub yaw_max: f32,
12690    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12691    pub gimbal_device_id: u8,
12692}
12693impl GIMBAL_MANAGER_INFORMATION_DATA {
12694    pub const ENCODED_LEN: usize = 33usize;
12695    pub const DEFAULT: Self = Self {
12696        time_boot_ms: 0_u32,
12697        cap_flags: GimbalManagerCapFlags::DEFAULT,
12698        roll_min: 0.0_f32,
12699        roll_max: 0.0_f32,
12700        pitch_min: 0.0_f32,
12701        pitch_max: 0.0_f32,
12702        yaw_min: 0.0_f32,
12703        yaw_max: 0.0_f32,
12704        gimbal_device_id: 0_u8,
12705    };
12706    #[cfg(feature = "arbitrary")]
12707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12708        use arbitrary::{Arbitrary, Unstructured};
12709        let mut buf = [0u8; 1024];
12710        rng.fill_bytes(&mut buf);
12711        let mut unstructured = Unstructured::new(&buf);
12712        Self::arbitrary(&mut unstructured).unwrap_or_default()
12713    }
12714}
12715impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12716    fn default() -> Self {
12717        Self::DEFAULT.clone()
12718    }
12719}
12720impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12721    type Message = MavMessage;
12722    const ID: u32 = 280u32;
12723    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12724    const EXTRA_CRC: u8 = 70u8;
12725    const ENCODED_LEN: usize = 33usize;
12726    fn deser(
12727        _version: MavlinkVersion,
12728        __input: &[u8],
12729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12730        let avail_len = __input.len();
12731        let mut payload_buf = [0; Self::ENCODED_LEN];
12732        let mut buf = if avail_len < Self::ENCODED_LEN {
12733            payload_buf[0..avail_len].copy_from_slice(__input);
12734            Bytes::new(&payload_buf)
12735        } else {
12736            Bytes::new(__input)
12737        };
12738        let mut __struct = Self::default();
12739        __struct.time_boot_ms = buf.get_u32_le();
12740        let tmp = buf.get_u32_le();
12741        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12742            tmp & GimbalManagerCapFlags::all().bits(),
12743        )
12744        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12745            flag_type: "GimbalManagerCapFlags",
12746            value: tmp as u32,
12747        })?;
12748        __struct.roll_min = buf.get_f32_le();
12749        __struct.roll_max = buf.get_f32_le();
12750        __struct.pitch_min = buf.get_f32_le();
12751        __struct.pitch_max = buf.get_f32_le();
12752        __struct.yaw_min = buf.get_f32_le();
12753        __struct.yaw_max = buf.get_f32_le();
12754        __struct.gimbal_device_id = buf.get_u8();
12755        Ok(__struct)
12756    }
12757    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12758        let mut __tmp = BytesMut::new(bytes);
12759        #[allow(clippy::absurd_extreme_comparisons)]
12760        #[allow(unused_comparisons)]
12761        if __tmp.remaining() < Self::ENCODED_LEN {
12762            panic!(
12763                "buffer is too small (need {} bytes, but got {})",
12764                Self::ENCODED_LEN,
12765                __tmp.remaining(),
12766            )
12767        }
12768        __tmp.put_u32_le(self.time_boot_ms);
12769        __tmp.put_u32_le(self.cap_flags.bits());
12770        __tmp.put_f32_le(self.roll_min);
12771        __tmp.put_f32_le(self.roll_max);
12772        __tmp.put_f32_le(self.pitch_min);
12773        __tmp.put_f32_le(self.pitch_max);
12774        __tmp.put_f32_le(self.yaw_min);
12775        __tmp.put_f32_le(self.yaw_max);
12776        __tmp.put_u8(self.gimbal_device_id);
12777        if matches!(version, MavlinkVersion::V2) {
12778            let len = __tmp.len();
12779            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12780        } else {
12781            __tmp.len()
12782        }
12783    }
12784}
12785#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12786#[doc = ""]
12787#[doc = "ID: 282"]
12788#[derive(Debug, Clone, PartialEq)]
12789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12790#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12791#[cfg_attr(feature = "ts", derive(TS))]
12792#[cfg_attr(feature = "ts", ts(export))]
12793pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12794    #[doc = "High level gimbal manager flags to use."]
12795    pub flags: GimbalManagerFlags,
12796    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12799    pub q: [f32; 4],
12800    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12801    pub angular_velocity_x: f32,
12802    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12803    pub angular_velocity_y: f32,
12804    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12805    pub angular_velocity_z: f32,
12806    #[doc = "System ID"]
12807    pub target_system: u8,
12808    #[doc = "Component ID"]
12809    pub target_component: u8,
12810    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12811    pub gimbal_device_id: u8,
12812}
12813impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12814    pub const ENCODED_LEN: usize = 35usize;
12815    pub const DEFAULT: Self = Self {
12816        flags: GimbalManagerFlags::DEFAULT,
12817        q: [0.0_f32; 4usize],
12818        angular_velocity_x: 0.0_f32,
12819        angular_velocity_y: 0.0_f32,
12820        angular_velocity_z: 0.0_f32,
12821        target_system: 0_u8,
12822        target_component: 0_u8,
12823        gimbal_device_id: 0_u8,
12824    };
12825    #[cfg(feature = "arbitrary")]
12826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12827        use arbitrary::{Arbitrary, Unstructured};
12828        let mut buf = [0u8; 1024];
12829        rng.fill_bytes(&mut buf);
12830        let mut unstructured = Unstructured::new(&buf);
12831        Self::arbitrary(&mut unstructured).unwrap_or_default()
12832    }
12833}
12834impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12835    fn default() -> Self {
12836        Self::DEFAULT.clone()
12837    }
12838}
12839impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12840    type Message = MavMessage;
12841    const ID: u32 = 282u32;
12842    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12843    const EXTRA_CRC: u8 = 123u8;
12844    const ENCODED_LEN: usize = 35usize;
12845    fn deser(
12846        _version: MavlinkVersion,
12847        __input: &[u8],
12848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12849        let avail_len = __input.len();
12850        let mut payload_buf = [0; Self::ENCODED_LEN];
12851        let mut buf = if avail_len < Self::ENCODED_LEN {
12852            payload_buf[0..avail_len].copy_from_slice(__input);
12853            Bytes::new(&payload_buf)
12854        } else {
12855            Bytes::new(__input)
12856        };
12857        let mut __struct = Self::default();
12858        let tmp = buf.get_u32_le();
12859        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12860            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12861                flag_type: "GimbalManagerFlags",
12862                value: tmp as u32,
12863            })?;
12864        for v in &mut __struct.q {
12865            let val = buf.get_f32_le();
12866            *v = val;
12867        }
12868        __struct.angular_velocity_x = buf.get_f32_le();
12869        __struct.angular_velocity_y = buf.get_f32_le();
12870        __struct.angular_velocity_z = buf.get_f32_le();
12871        __struct.target_system = buf.get_u8();
12872        __struct.target_component = buf.get_u8();
12873        __struct.gimbal_device_id = buf.get_u8();
12874        Ok(__struct)
12875    }
12876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12877        let mut __tmp = BytesMut::new(bytes);
12878        #[allow(clippy::absurd_extreme_comparisons)]
12879        #[allow(unused_comparisons)]
12880        if __tmp.remaining() < Self::ENCODED_LEN {
12881            panic!(
12882                "buffer is too small (need {} bytes, but got {})",
12883                Self::ENCODED_LEN,
12884                __tmp.remaining(),
12885            )
12886        }
12887        __tmp.put_u32_le(self.flags.bits());
12888        for val in &self.q {
12889            __tmp.put_f32_le(*val);
12890        }
12891        __tmp.put_f32_le(self.angular_velocity_x);
12892        __tmp.put_f32_le(self.angular_velocity_y);
12893        __tmp.put_f32_le(self.angular_velocity_z);
12894        __tmp.put_u8(self.target_system);
12895        __tmp.put_u8(self.target_component);
12896        __tmp.put_u8(self.gimbal_device_id);
12897        if matches!(version, MavlinkVersion::V2) {
12898            let len = __tmp.len();
12899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12900        } else {
12901            __tmp.len()
12902        }
12903    }
12904}
12905#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12906#[doc = ""]
12907#[doc = "ID: 288"]
12908#[derive(Debug, Clone, PartialEq)]
12909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12911#[cfg_attr(feature = "ts", derive(TS))]
12912#[cfg_attr(feature = "ts", ts(export))]
12913pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12914    #[doc = "High level gimbal manager flags."]
12915    pub flags: GimbalManagerFlags,
12916    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12917    pub pitch: f32,
12918    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12919    pub yaw: f32,
12920    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12921    pub pitch_rate: f32,
12922    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12923    pub yaw_rate: f32,
12924    #[doc = "System ID"]
12925    pub target_system: u8,
12926    #[doc = "Component ID"]
12927    pub target_component: u8,
12928    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12929    pub gimbal_device_id: u8,
12930}
12931impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12932    pub const ENCODED_LEN: usize = 23usize;
12933    pub const DEFAULT: Self = Self {
12934        flags: GimbalManagerFlags::DEFAULT,
12935        pitch: 0.0_f32,
12936        yaw: 0.0_f32,
12937        pitch_rate: 0.0_f32,
12938        yaw_rate: 0.0_f32,
12939        target_system: 0_u8,
12940        target_component: 0_u8,
12941        gimbal_device_id: 0_u8,
12942    };
12943    #[cfg(feature = "arbitrary")]
12944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12945        use arbitrary::{Arbitrary, Unstructured};
12946        let mut buf = [0u8; 1024];
12947        rng.fill_bytes(&mut buf);
12948        let mut unstructured = Unstructured::new(&buf);
12949        Self::arbitrary(&mut unstructured).unwrap_or_default()
12950    }
12951}
12952impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12953    fn default() -> Self {
12954        Self::DEFAULT.clone()
12955    }
12956}
12957impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12958    type Message = MavMessage;
12959    const ID: u32 = 288u32;
12960    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12961    const EXTRA_CRC: u8 = 20u8;
12962    const ENCODED_LEN: usize = 23usize;
12963    fn deser(
12964        _version: MavlinkVersion,
12965        __input: &[u8],
12966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12967        let avail_len = __input.len();
12968        let mut payload_buf = [0; Self::ENCODED_LEN];
12969        let mut buf = if avail_len < Self::ENCODED_LEN {
12970            payload_buf[0..avail_len].copy_from_slice(__input);
12971            Bytes::new(&payload_buf)
12972        } else {
12973            Bytes::new(__input)
12974        };
12975        let mut __struct = Self::default();
12976        let tmp = buf.get_u32_le();
12977        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12978            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12979                flag_type: "GimbalManagerFlags",
12980                value: tmp as u32,
12981            })?;
12982        __struct.pitch = buf.get_f32_le();
12983        __struct.yaw = buf.get_f32_le();
12984        __struct.pitch_rate = buf.get_f32_le();
12985        __struct.yaw_rate = buf.get_f32_le();
12986        __struct.target_system = buf.get_u8();
12987        __struct.target_component = buf.get_u8();
12988        __struct.gimbal_device_id = buf.get_u8();
12989        Ok(__struct)
12990    }
12991    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12992        let mut __tmp = BytesMut::new(bytes);
12993        #[allow(clippy::absurd_extreme_comparisons)]
12994        #[allow(unused_comparisons)]
12995        if __tmp.remaining() < Self::ENCODED_LEN {
12996            panic!(
12997                "buffer is too small (need {} bytes, but got {})",
12998                Self::ENCODED_LEN,
12999                __tmp.remaining(),
13000            )
13001        }
13002        __tmp.put_u32_le(self.flags.bits());
13003        __tmp.put_f32_le(self.pitch);
13004        __tmp.put_f32_le(self.yaw);
13005        __tmp.put_f32_le(self.pitch_rate);
13006        __tmp.put_f32_le(self.yaw_rate);
13007        __tmp.put_u8(self.target_system);
13008        __tmp.put_u8(self.target_component);
13009        __tmp.put_u8(self.gimbal_device_id);
13010        if matches!(version, MavlinkVersion::V2) {
13011            let len = __tmp.len();
13012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13013        } else {
13014            __tmp.len()
13015        }
13016    }
13017}
13018#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13019#[doc = ""]
13020#[doc = "ID: 287"]
13021#[derive(Debug, Clone, PartialEq)]
13022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13024#[cfg_attr(feature = "ts", derive(TS))]
13025#[cfg_attr(feature = "ts", ts(export))]
13026pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13027    #[doc = "High level gimbal manager flags to use."]
13028    pub flags: GimbalManagerFlags,
13029    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13030    pub pitch: f32,
13031    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13032    pub yaw: f32,
13033    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13034    pub pitch_rate: f32,
13035    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13036    pub yaw_rate: f32,
13037    #[doc = "System ID"]
13038    pub target_system: u8,
13039    #[doc = "Component ID"]
13040    pub target_component: u8,
13041    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13042    pub gimbal_device_id: u8,
13043}
13044impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13045    pub const ENCODED_LEN: usize = 23usize;
13046    pub const DEFAULT: Self = Self {
13047        flags: GimbalManagerFlags::DEFAULT,
13048        pitch: 0.0_f32,
13049        yaw: 0.0_f32,
13050        pitch_rate: 0.0_f32,
13051        yaw_rate: 0.0_f32,
13052        target_system: 0_u8,
13053        target_component: 0_u8,
13054        gimbal_device_id: 0_u8,
13055    };
13056    #[cfg(feature = "arbitrary")]
13057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13058        use arbitrary::{Arbitrary, Unstructured};
13059        let mut buf = [0u8; 1024];
13060        rng.fill_bytes(&mut buf);
13061        let mut unstructured = Unstructured::new(&buf);
13062        Self::arbitrary(&mut unstructured).unwrap_or_default()
13063    }
13064}
13065impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13066    fn default() -> Self {
13067        Self::DEFAULT.clone()
13068    }
13069}
13070impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13071    type Message = MavMessage;
13072    const ID: u32 = 287u32;
13073    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13074    const EXTRA_CRC: u8 = 1u8;
13075    const ENCODED_LEN: usize = 23usize;
13076    fn deser(
13077        _version: MavlinkVersion,
13078        __input: &[u8],
13079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13080        let avail_len = __input.len();
13081        let mut payload_buf = [0; Self::ENCODED_LEN];
13082        let mut buf = if avail_len < Self::ENCODED_LEN {
13083            payload_buf[0..avail_len].copy_from_slice(__input);
13084            Bytes::new(&payload_buf)
13085        } else {
13086            Bytes::new(__input)
13087        };
13088        let mut __struct = Self::default();
13089        let tmp = buf.get_u32_le();
13090        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13091            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13092                flag_type: "GimbalManagerFlags",
13093                value: tmp as u32,
13094            })?;
13095        __struct.pitch = buf.get_f32_le();
13096        __struct.yaw = buf.get_f32_le();
13097        __struct.pitch_rate = buf.get_f32_le();
13098        __struct.yaw_rate = buf.get_f32_le();
13099        __struct.target_system = buf.get_u8();
13100        __struct.target_component = buf.get_u8();
13101        __struct.gimbal_device_id = buf.get_u8();
13102        Ok(__struct)
13103    }
13104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13105        let mut __tmp = BytesMut::new(bytes);
13106        #[allow(clippy::absurd_extreme_comparisons)]
13107        #[allow(unused_comparisons)]
13108        if __tmp.remaining() < Self::ENCODED_LEN {
13109            panic!(
13110                "buffer is too small (need {} bytes, but got {})",
13111                Self::ENCODED_LEN,
13112                __tmp.remaining(),
13113            )
13114        }
13115        __tmp.put_u32_le(self.flags.bits());
13116        __tmp.put_f32_le(self.pitch);
13117        __tmp.put_f32_le(self.yaw);
13118        __tmp.put_f32_le(self.pitch_rate);
13119        __tmp.put_f32_le(self.yaw_rate);
13120        __tmp.put_u8(self.target_system);
13121        __tmp.put_u8(self.target_component);
13122        __tmp.put_u8(self.gimbal_device_id);
13123        if matches!(version, MavlinkVersion::V2) {
13124            let len = __tmp.len();
13125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13126        } else {
13127            __tmp.len()
13128        }
13129    }
13130}
13131#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13132#[doc = ""]
13133#[doc = "ID: 281"]
13134#[derive(Debug, Clone, PartialEq)]
13135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13137#[cfg_attr(feature = "ts", derive(TS))]
13138#[cfg_attr(feature = "ts", ts(export))]
13139pub struct GIMBAL_MANAGER_STATUS_DATA {
13140    #[doc = "Timestamp (time since system boot)."]
13141    pub time_boot_ms: u32,
13142    #[doc = "High level gimbal manager flags currently applied."]
13143    pub flags: GimbalManagerFlags,
13144    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13145    pub gimbal_device_id: u8,
13146    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13147    pub primary_control_sysid: u8,
13148    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13149    pub primary_control_compid: u8,
13150    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13151    pub secondary_control_sysid: u8,
13152    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13153    pub secondary_control_compid: u8,
13154}
13155impl GIMBAL_MANAGER_STATUS_DATA {
13156    pub const ENCODED_LEN: usize = 13usize;
13157    pub const DEFAULT: Self = Self {
13158        time_boot_ms: 0_u32,
13159        flags: GimbalManagerFlags::DEFAULT,
13160        gimbal_device_id: 0_u8,
13161        primary_control_sysid: 0_u8,
13162        primary_control_compid: 0_u8,
13163        secondary_control_sysid: 0_u8,
13164        secondary_control_compid: 0_u8,
13165    };
13166    #[cfg(feature = "arbitrary")]
13167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13168        use arbitrary::{Arbitrary, Unstructured};
13169        let mut buf = [0u8; 1024];
13170        rng.fill_bytes(&mut buf);
13171        let mut unstructured = Unstructured::new(&buf);
13172        Self::arbitrary(&mut unstructured).unwrap_or_default()
13173    }
13174}
13175impl Default for GIMBAL_MANAGER_STATUS_DATA {
13176    fn default() -> Self {
13177        Self::DEFAULT.clone()
13178    }
13179}
13180impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13181    type Message = MavMessage;
13182    const ID: u32 = 281u32;
13183    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13184    const EXTRA_CRC: u8 = 48u8;
13185    const ENCODED_LEN: usize = 13usize;
13186    fn deser(
13187        _version: MavlinkVersion,
13188        __input: &[u8],
13189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13190        let avail_len = __input.len();
13191        let mut payload_buf = [0; Self::ENCODED_LEN];
13192        let mut buf = if avail_len < Self::ENCODED_LEN {
13193            payload_buf[0..avail_len].copy_from_slice(__input);
13194            Bytes::new(&payload_buf)
13195        } else {
13196            Bytes::new(__input)
13197        };
13198        let mut __struct = Self::default();
13199        __struct.time_boot_ms = buf.get_u32_le();
13200        let tmp = buf.get_u32_le();
13201        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13202            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13203                flag_type: "GimbalManagerFlags",
13204                value: tmp as u32,
13205            })?;
13206        __struct.gimbal_device_id = buf.get_u8();
13207        __struct.primary_control_sysid = buf.get_u8();
13208        __struct.primary_control_compid = buf.get_u8();
13209        __struct.secondary_control_sysid = buf.get_u8();
13210        __struct.secondary_control_compid = buf.get_u8();
13211        Ok(__struct)
13212    }
13213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13214        let mut __tmp = BytesMut::new(bytes);
13215        #[allow(clippy::absurd_extreme_comparisons)]
13216        #[allow(unused_comparisons)]
13217        if __tmp.remaining() < Self::ENCODED_LEN {
13218            panic!(
13219                "buffer is too small (need {} bytes, but got {})",
13220                Self::ENCODED_LEN,
13221                __tmp.remaining(),
13222            )
13223        }
13224        __tmp.put_u32_le(self.time_boot_ms);
13225        __tmp.put_u32_le(self.flags.bits());
13226        __tmp.put_u8(self.gimbal_device_id);
13227        __tmp.put_u8(self.primary_control_sysid);
13228        __tmp.put_u8(self.primary_control_compid);
13229        __tmp.put_u8(self.secondary_control_sysid);
13230        __tmp.put_u8(self.secondary_control_compid);
13231        if matches!(version, MavlinkVersion::V2) {
13232            let len = __tmp.len();
13233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13234        } else {
13235            __tmp.len()
13236        }
13237    }
13238}
13239#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13240#[doc = ""]
13241#[doc = "ID: 33"]
13242#[derive(Debug, Clone, PartialEq)]
13243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13245#[cfg_attr(feature = "ts", derive(TS))]
13246#[cfg_attr(feature = "ts", ts(export))]
13247pub struct GLOBAL_POSITION_INT_DATA {
13248    #[doc = "Timestamp (time since system boot)."]
13249    pub time_boot_ms: u32,
13250    #[doc = "Latitude, expressed"]
13251    pub lat: i32,
13252    #[doc = "Longitude, expressed"]
13253    pub lon: i32,
13254    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13255    pub alt: i32,
13256    #[doc = "Altitude above home"]
13257    pub relative_alt: i32,
13258    #[doc = "Ground X Speed (Latitude, positive north)"]
13259    pub vx: i16,
13260    #[doc = "Ground Y Speed (Longitude, positive east)"]
13261    pub vy: i16,
13262    #[doc = "Ground Z Speed (Altitude, positive down)"]
13263    pub vz: i16,
13264    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13265    pub hdg: u16,
13266}
13267impl GLOBAL_POSITION_INT_DATA {
13268    pub const ENCODED_LEN: usize = 28usize;
13269    pub const DEFAULT: Self = Self {
13270        time_boot_ms: 0_u32,
13271        lat: 0_i32,
13272        lon: 0_i32,
13273        alt: 0_i32,
13274        relative_alt: 0_i32,
13275        vx: 0_i16,
13276        vy: 0_i16,
13277        vz: 0_i16,
13278        hdg: 0_u16,
13279    };
13280    #[cfg(feature = "arbitrary")]
13281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13282        use arbitrary::{Arbitrary, Unstructured};
13283        let mut buf = [0u8; 1024];
13284        rng.fill_bytes(&mut buf);
13285        let mut unstructured = Unstructured::new(&buf);
13286        Self::arbitrary(&mut unstructured).unwrap_or_default()
13287    }
13288}
13289impl Default for GLOBAL_POSITION_INT_DATA {
13290    fn default() -> Self {
13291        Self::DEFAULT.clone()
13292    }
13293}
13294impl MessageData for GLOBAL_POSITION_INT_DATA {
13295    type Message = MavMessage;
13296    const ID: u32 = 33u32;
13297    const NAME: &'static str = "GLOBAL_POSITION_INT";
13298    const EXTRA_CRC: u8 = 104u8;
13299    const ENCODED_LEN: usize = 28usize;
13300    fn deser(
13301        _version: MavlinkVersion,
13302        __input: &[u8],
13303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13304        let avail_len = __input.len();
13305        let mut payload_buf = [0; Self::ENCODED_LEN];
13306        let mut buf = if avail_len < Self::ENCODED_LEN {
13307            payload_buf[0..avail_len].copy_from_slice(__input);
13308            Bytes::new(&payload_buf)
13309        } else {
13310            Bytes::new(__input)
13311        };
13312        let mut __struct = Self::default();
13313        __struct.time_boot_ms = buf.get_u32_le();
13314        __struct.lat = buf.get_i32_le();
13315        __struct.lon = buf.get_i32_le();
13316        __struct.alt = buf.get_i32_le();
13317        __struct.relative_alt = buf.get_i32_le();
13318        __struct.vx = buf.get_i16_le();
13319        __struct.vy = buf.get_i16_le();
13320        __struct.vz = buf.get_i16_le();
13321        __struct.hdg = buf.get_u16_le();
13322        Ok(__struct)
13323    }
13324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13325        let mut __tmp = BytesMut::new(bytes);
13326        #[allow(clippy::absurd_extreme_comparisons)]
13327        #[allow(unused_comparisons)]
13328        if __tmp.remaining() < Self::ENCODED_LEN {
13329            panic!(
13330                "buffer is too small (need {} bytes, but got {})",
13331                Self::ENCODED_LEN,
13332                __tmp.remaining(),
13333            )
13334        }
13335        __tmp.put_u32_le(self.time_boot_ms);
13336        __tmp.put_i32_le(self.lat);
13337        __tmp.put_i32_le(self.lon);
13338        __tmp.put_i32_le(self.alt);
13339        __tmp.put_i32_le(self.relative_alt);
13340        __tmp.put_i16_le(self.vx);
13341        __tmp.put_i16_le(self.vy);
13342        __tmp.put_i16_le(self.vz);
13343        __tmp.put_u16_le(self.hdg);
13344        if matches!(version, MavlinkVersion::V2) {
13345            let len = __tmp.len();
13346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13347        } else {
13348            __tmp.len()
13349        }
13350    }
13351}
13352#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13353#[doc = ""]
13354#[doc = "ID: 63"]
13355#[derive(Debug, Clone, PartialEq)]
13356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13358#[cfg_attr(feature = "ts", derive(TS))]
13359#[cfg_attr(feature = "ts", ts(export))]
13360pub struct GLOBAL_POSITION_INT_COV_DATA {
13361    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13362    pub time_usec: u64,
13363    #[doc = "Latitude"]
13364    pub lat: i32,
13365    #[doc = "Longitude"]
13366    pub lon: i32,
13367    #[doc = "Altitude in meters above MSL"]
13368    pub alt: i32,
13369    #[doc = "Altitude above ground"]
13370    pub relative_alt: i32,
13371    #[doc = "Ground X Speed (Latitude)"]
13372    pub vx: f32,
13373    #[doc = "Ground Y Speed (Longitude)"]
13374    pub vy: f32,
13375    #[doc = "Ground Z Speed (Altitude)"]
13376    pub vz: f32,
13377    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13379    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13380    pub covariance: [f32; 36],
13381    #[doc = "Class id of the estimator this estimate originated from."]
13382    pub estimator_type: MavEstimatorType,
13383}
13384impl GLOBAL_POSITION_INT_COV_DATA {
13385    pub const ENCODED_LEN: usize = 181usize;
13386    pub const DEFAULT: Self = Self {
13387        time_usec: 0_u64,
13388        lat: 0_i32,
13389        lon: 0_i32,
13390        alt: 0_i32,
13391        relative_alt: 0_i32,
13392        vx: 0.0_f32,
13393        vy: 0.0_f32,
13394        vz: 0.0_f32,
13395        covariance: [0.0_f32; 36usize],
13396        estimator_type: MavEstimatorType::DEFAULT,
13397    };
13398    #[cfg(feature = "arbitrary")]
13399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13400        use arbitrary::{Arbitrary, Unstructured};
13401        let mut buf = [0u8; 1024];
13402        rng.fill_bytes(&mut buf);
13403        let mut unstructured = Unstructured::new(&buf);
13404        Self::arbitrary(&mut unstructured).unwrap_or_default()
13405    }
13406}
13407impl Default for GLOBAL_POSITION_INT_COV_DATA {
13408    fn default() -> Self {
13409        Self::DEFAULT.clone()
13410    }
13411}
13412impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13413    type Message = MavMessage;
13414    const ID: u32 = 63u32;
13415    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13416    const EXTRA_CRC: u8 = 119u8;
13417    const ENCODED_LEN: usize = 181usize;
13418    fn deser(
13419        _version: MavlinkVersion,
13420        __input: &[u8],
13421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13422        let avail_len = __input.len();
13423        let mut payload_buf = [0; Self::ENCODED_LEN];
13424        let mut buf = if avail_len < Self::ENCODED_LEN {
13425            payload_buf[0..avail_len].copy_from_slice(__input);
13426            Bytes::new(&payload_buf)
13427        } else {
13428            Bytes::new(__input)
13429        };
13430        let mut __struct = Self::default();
13431        __struct.time_usec = buf.get_u64_le();
13432        __struct.lat = buf.get_i32_le();
13433        __struct.lon = buf.get_i32_le();
13434        __struct.alt = buf.get_i32_le();
13435        __struct.relative_alt = buf.get_i32_le();
13436        __struct.vx = buf.get_f32_le();
13437        __struct.vy = buf.get_f32_le();
13438        __struct.vz = buf.get_f32_le();
13439        for v in &mut __struct.covariance {
13440            let val = buf.get_f32_le();
13441            *v = val;
13442        }
13443        let tmp = buf.get_u8();
13444        __struct.estimator_type =
13445            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13446                enum_type: "MavEstimatorType",
13447                value: tmp as u32,
13448            })?;
13449        Ok(__struct)
13450    }
13451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13452        let mut __tmp = BytesMut::new(bytes);
13453        #[allow(clippy::absurd_extreme_comparisons)]
13454        #[allow(unused_comparisons)]
13455        if __tmp.remaining() < Self::ENCODED_LEN {
13456            panic!(
13457                "buffer is too small (need {} bytes, but got {})",
13458                Self::ENCODED_LEN,
13459                __tmp.remaining(),
13460            )
13461        }
13462        __tmp.put_u64_le(self.time_usec);
13463        __tmp.put_i32_le(self.lat);
13464        __tmp.put_i32_le(self.lon);
13465        __tmp.put_i32_le(self.alt);
13466        __tmp.put_i32_le(self.relative_alt);
13467        __tmp.put_f32_le(self.vx);
13468        __tmp.put_f32_le(self.vy);
13469        __tmp.put_f32_le(self.vz);
13470        for val in &self.covariance {
13471            __tmp.put_f32_le(*val);
13472        }
13473        __tmp.put_u8(self.estimator_type as u8);
13474        if matches!(version, MavlinkVersion::V2) {
13475            let len = __tmp.len();
13476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13477        } else {
13478            __tmp.len()
13479        }
13480    }
13481}
13482#[doc = "Global position/attitude estimate from a vision source."]
13483#[doc = ""]
13484#[doc = "ID: 101"]
13485#[derive(Debug, Clone, PartialEq)]
13486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13488#[cfg_attr(feature = "ts", derive(TS))]
13489#[cfg_attr(feature = "ts", ts(export))]
13490pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13491    #[doc = "Timestamp (UNIX time or since system boot)"]
13492    pub usec: u64,
13493    #[doc = "Global X position"]
13494    pub x: f32,
13495    #[doc = "Global Y position"]
13496    pub y: f32,
13497    #[doc = "Global Z position"]
13498    pub z: f32,
13499    #[doc = "Roll angle"]
13500    pub roll: f32,
13501    #[doc = "Pitch angle"]
13502    pub pitch: f32,
13503    #[doc = "Yaw angle"]
13504    pub yaw: f32,
13505    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13506    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13507    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13508    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13509    pub covariance: [f32; 21],
13510    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13511    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13512    pub reset_counter: u8,
13513}
13514impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13515    pub const ENCODED_LEN: usize = 117usize;
13516    pub const DEFAULT: Self = Self {
13517        usec: 0_u64,
13518        x: 0.0_f32,
13519        y: 0.0_f32,
13520        z: 0.0_f32,
13521        roll: 0.0_f32,
13522        pitch: 0.0_f32,
13523        yaw: 0.0_f32,
13524        covariance: [0.0_f32; 21usize],
13525        reset_counter: 0_u8,
13526    };
13527    #[cfg(feature = "arbitrary")]
13528    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13529        use arbitrary::{Arbitrary, Unstructured};
13530        let mut buf = [0u8; 1024];
13531        rng.fill_bytes(&mut buf);
13532        let mut unstructured = Unstructured::new(&buf);
13533        Self::arbitrary(&mut unstructured).unwrap_or_default()
13534    }
13535}
13536impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13537    fn default() -> Self {
13538        Self::DEFAULT.clone()
13539    }
13540}
13541impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13542    type Message = MavMessage;
13543    const ID: u32 = 101u32;
13544    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13545    const EXTRA_CRC: u8 = 102u8;
13546    const ENCODED_LEN: usize = 117usize;
13547    fn deser(
13548        _version: MavlinkVersion,
13549        __input: &[u8],
13550    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13551        let avail_len = __input.len();
13552        let mut payload_buf = [0; Self::ENCODED_LEN];
13553        let mut buf = if avail_len < Self::ENCODED_LEN {
13554            payload_buf[0..avail_len].copy_from_slice(__input);
13555            Bytes::new(&payload_buf)
13556        } else {
13557            Bytes::new(__input)
13558        };
13559        let mut __struct = Self::default();
13560        __struct.usec = buf.get_u64_le();
13561        __struct.x = buf.get_f32_le();
13562        __struct.y = buf.get_f32_le();
13563        __struct.z = buf.get_f32_le();
13564        __struct.roll = buf.get_f32_le();
13565        __struct.pitch = buf.get_f32_le();
13566        __struct.yaw = buf.get_f32_le();
13567        for v in &mut __struct.covariance {
13568            let val = buf.get_f32_le();
13569            *v = val;
13570        }
13571        __struct.reset_counter = buf.get_u8();
13572        Ok(__struct)
13573    }
13574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13575        let mut __tmp = BytesMut::new(bytes);
13576        #[allow(clippy::absurd_extreme_comparisons)]
13577        #[allow(unused_comparisons)]
13578        if __tmp.remaining() < Self::ENCODED_LEN {
13579            panic!(
13580                "buffer is too small (need {} bytes, but got {})",
13581                Self::ENCODED_LEN,
13582                __tmp.remaining(),
13583            )
13584        }
13585        __tmp.put_u64_le(self.usec);
13586        __tmp.put_f32_le(self.x);
13587        __tmp.put_f32_le(self.y);
13588        __tmp.put_f32_le(self.z);
13589        __tmp.put_f32_le(self.roll);
13590        __tmp.put_f32_le(self.pitch);
13591        __tmp.put_f32_le(self.yaw);
13592        if matches!(version, MavlinkVersion::V2) {
13593            for val in &self.covariance {
13594                __tmp.put_f32_le(*val);
13595            }
13596            __tmp.put_u8(self.reset_counter);
13597            let len = __tmp.len();
13598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13599        } else {
13600            __tmp.len()
13601        }
13602    }
13603}
13604#[doc = "Second GPS data."]
13605#[doc = ""]
13606#[doc = "ID: 124"]
13607#[derive(Debug, Clone, PartialEq)]
13608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13610#[cfg_attr(feature = "ts", derive(TS))]
13611#[cfg_attr(feature = "ts", ts(export))]
13612pub struct GPS2_RAW_DATA {
13613    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13614    pub time_usec: u64,
13615    #[doc = "Latitude (WGS84)"]
13616    pub lat: i32,
13617    #[doc = "Longitude (WGS84)"]
13618    pub lon: i32,
13619    #[doc = "Altitude (MSL). Positive for up."]
13620    pub alt: i32,
13621    #[doc = "Age of DGPS info"]
13622    pub dgps_age: u32,
13623    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13624    pub eph: u16,
13625    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13626    pub epv: u16,
13627    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13628    pub vel: u16,
13629    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13630    pub cog: u16,
13631    #[doc = "GPS fix type."]
13632    pub fix_type: GpsFixType,
13633    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13634    pub satellites_visible: u8,
13635    #[doc = "Number of DGPS satellites"]
13636    pub dgps_numch: u8,
13637    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13638    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13639    pub yaw: u16,
13640    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13641    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13642    pub alt_ellipsoid: i32,
13643    #[doc = "Position uncertainty."]
13644    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13645    pub h_acc: u32,
13646    #[doc = "Altitude uncertainty."]
13647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13648    pub v_acc: u32,
13649    #[doc = "Speed uncertainty."]
13650    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13651    pub vel_acc: u32,
13652    #[doc = "Heading / track uncertainty"]
13653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13654    pub hdg_acc: u32,
13655}
13656impl GPS2_RAW_DATA {
13657    pub const ENCODED_LEN: usize = 57usize;
13658    pub const DEFAULT: Self = Self {
13659        time_usec: 0_u64,
13660        lat: 0_i32,
13661        lon: 0_i32,
13662        alt: 0_i32,
13663        dgps_age: 0_u32,
13664        eph: 0_u16,
13665        epv: 0_u16,
13666        vel: 0_u16,
13667        cog: 0_u16,
13668        fix_type: GpsFixType::DEFAULT,
13669        satellites_visible: 0_u8,
13670        dgps_numch: 0_u8,
13671        yaw: 0_u16,
13672        alt_ellipsoid: 0_i32,
13673        h_acc: 0_u32,
13674        v_acc: 0_u32,
13675        vel_acc: 0_u32,
13676        hdg_acc: 0_u32,
13677    };
13678    #[cfg(feature = "arbitrary")]
13679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13680        use arbitrary::{Arbitrary, Unstructured};
13681        let mut buf = [0u8; 1024];
13682        rng.fill_bytes(&mut buf);
13683        let mut unstructured = Unstructured::new(&buf);
13684        Self::arbitrary(&mut unstructured).unwrap_or_default()
13685    }
13686}
13687impl Default for GPS2_RAW_DATA {
13688    fn default() -> Self {
13689        Self::DEFAULT.clone()
13690    }
13691}
13692impl MessageData for GPS2_RAW_DATA {
13693    type Message = MavMessage;
13694    const ID: u32 = 124u32;
13695    const NAME: &'static str = "GPS2_RAW";
13696    const EXTRA_CRC: u8 = 87u8;
13697    const ENCODED_LEN: usize = 57usize;
13698    fn deser(
13699        _version: MavlinkVersion,
13700        __input: &[u8],
13701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13702        let avail_len = __input.len();
13703        let mut payload_buf = [0; Self::ENCODED_LEN];
13704        let mut buf = if avail_len < Self::ENCODED_LEN {
13705            payload_buf[0..avail_len].copy_from_slice(__input);
13706            Bytes::new(&payload_buf)
13707        } else {
13708            Bytes::new(__input)
13709        };
13710        let mut __struct = Self::default();
13711        __struct.time_usec = buf.get_u64_le();
13712        __struct.lat = buf.get_i32_le();
13713        __struct.lon = buf.get_i32_le();
13714        __struct.alt = buf.get_i32_le();
13715        __struct.dgps_age = buf.get_u32_le();
13716        __struct.eph = buf.get_u16_le();
13717        __struct.epv = buf.get_u16_le();
13718        __struct.vel = buf.get_u16_le();
13719        __struct.cog = buf.get_u16_le();
13720        let tmp = buf.get_u8();
13721        __struct.fix_type =
13722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13723                enum_type: "GpsFixType",
13724                value: tmp as u32,
13725            })?;
13726        __struct.satellites_visible = buf.get_u8();
13727        __struct.dgps_numch = buf.get_u8();
13728        __struct.yaw = buf.get_u16_le();
13729        __struct.alt_ellipsoid = buf.get_i32_le();
13730        __struct.h_acc = buf.get_u32_le();
13731        __struct.v_acc = buf.get_u32_le();
13732        __struct.vel_acc = buf.get_u32_le();
13733        __struct.hdg_acc = buf.get_u32_le();
13734        Ok(__struct)
13735    }
13736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13737        let mut __tmp = BytesMut::new(bytes);
13738        #[allow(clippy::absurd_extreme_comparisons)]
13739        #[allow(unused_comparisons)]
13740        if __tmp.remaining() < Self::ENCODED_LEN {
13741            panic!(
13742                "buffer is too small (need {} bytes, but got {})",
13743                Self::ENCODED_LEN,
13744                __tmp.remaining(),
13745            )
13746        }
13747        __tmp.put_u64_le(self.time_usec);
13748        __tmp.put_i32_le(self.lat);
13749        __tmp.put_i32_le(self.lon);
13750        __tmp.put_i32_le(self.alt);
13751        __tmp.put_u32_le(self.dgps_age);
13752        __tmp.put_u16_le(self.eph);
13753        __tmp.put_u16_le(self.epv);
13754        __tmp.put_u16_le(self.vel);
13755        __tmp.put_u16_le(self.cog);
13756        __tmp.put_u8(self.fix_type as u8);
13757        __tmp.put_u8(self.satellites_visible);
13758        __tmp.put_u8(self.dgps_numch);
13759        if matches!(version, MavlinkVersion::V2) {
13760            __tmp.put_u16_le(self.yaw);
13761            __tmp.put_i32_le(self.alt_ellipsoid);
13762            __tmp.put_u32_le(self.h_acc);
13763            __tmp.put_u32_le(self.v_acc);
13764            __tmp.put_u32_le(self.vel_acc);
13765            __tmp.put_u32_le(self.hdg_acc);
13766            let len = __tmp.len();
13767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13768        } else {
13769            __tmp.len()
13770        }
13771    }
13772}
13773#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13774#[doc = ""]
13775#[doc = "ID: 128"]
13776#[derive(Debug, Clone, PartialEq)]
13777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13779#[cfg_attr(feature = "ts", derive(TS))]
13780#[cfg_attr(feature = "ts", ts(export))]
13781pub struct GPS2_RTK_DATA {
13782    #[doc = "Time since boot of last baseline message received."]
13783    pub time_last_baseline_ms: u32,
13784    #[doc = "GPS Time of Week of last baseline"]
13785    pub tow: u32,
13786    #[doc = "Current baseline in ECEF x or NED north component."]
13787    pub baseline_a_mm: i32,
13788    #[doc = "Current baseline in ECEF y or NED east component."]
13789    pub baseline_b_mm: i32,
13790    #[doc = "Current baseline in ECEF z or NED down component."]
13791    pub baseline_c_mm: i32,
13792    #[doc = "Current estimate of baseline accuracy."]
13793    pub accuracy: u32,
13794    #[doc = "Current number of integer ambiguity hypotheses."]
13795    pub iar_num_hypotheses: i32,
13796    #[doc = "GPS Week Number of last baseline"]
13797    pub wn: u16,
13798    #[doc = "Identification of connected RTK receiver."]
13799    pub rtk_receiver_id: u8,
13800    #[doc = "GPS-specific health report for RTK data."]
13801    pub rtk_health: u8,
13802    #[doc = "Rate of baseline messages being received by GPS"]
13803    pub rtk_rate: u8,
13804    #[doc = "Current number of sats used for RTK calculation."]
13805    pub nsats: u8,
13806    #[doc = "Coordinate system of baseline"]
13807    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13808}
13809impl GPS2_RTK_DATA {
13810    pub const ENCODED_LEN: usize = 35usize;
13811    pub const DEFAULT: Self = Self {
13812        time_last_baseline_ms: 0_u32,
13813        tow: 0_u32,
13814        baseline_a_mm: 0_i32,
13815        baseline_b_mm: 0_i32,
13816        baseline_c_mm: 0_i32,
13817        accuracy: 0_u32,
13818        iar_num_hypotheses: 0_i32,
13819        wn: 0_u16,
13820        rtk_receiver_id: 0_u8,
13821        rtk_health: 0_u8,
13822        rtk_rate: 0_u8,
13823        nsats: 0_u8,
13824        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13825    };
13826    #[cfg(feature = "arbitrary")]
13827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13828        use arbitrary::{Arbitrary, Unstructured};
13829        let mut buf = [0u8; 1024];
13830        rng.fill_bytes(&mut buf);
13831        let mut unstructured = Unstructured::new(&buf);
13832        Self::arbitrary(&mut unstructured).unwrap_or_default()
13833    }
13834}
13835impl Default for GPS2_RTK_DATA {
13836    fn default() -> Self {
13837        Self::DEFAULT.clone()
13838    }
13839}
13840impl MessageData for GPS2_RTK_DATA {
13841    type Message = MavMessage;
13842    const ID: u32 = 128u32;
13843    const NAME: &'static str = "GPS2_RTK";
13844    const EXTRA_CRC: u8 = 226u8;
13845    const ENCODED_LEN: usize = 35usize;
13846    fn deser(
13847        _version: MavlinkVersion,
13848        __input: &[u8],
13849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13850        let avail_len = __input.len();
13851        let mut payload_buf = [0; Self::ENCODED_LEN];
13852        let mut buf = if avail_len < Self::ENCODED_LEN {
13853            payload_buf[0..avail_len].copy_from_slice(__input);
13854            Bytes::new(&payload_buf)
13855        } else {
13856            Bytes::new(__input)
13857        };
13858        let mut __struct = Self::default();
13859        __struct.time_last_baseline_ms = buf.get_u32_le();
13860        __struct.tow = buf.get_u32_le();
13861        __struct.baseline_a_mm = buf.get_i32_le();
13862        __struct.baseline_b_mm = buf.get_i32_le();
13863        __struct.baseline_c_mm = buf.get_i32_le();
13864        __struct.accuracy = buf.get_u32_le();
13865        __struct.iar_num_hypotheses = buf.get_i32_le();
13866        __struct.wn = buf.get_u16_le();
13867        __struct.rtk_receiver_id = buf.get_u8();
13868        __struct.rtk_health = buf.get_u8();
13869        __struct.rtk_rate = buf.get_u8();
13870        __struct.nsats = buf.get_u8();
13871        let tmp = buf.get_u8();
13872        __struct.baseline_coords_type =
13873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13874                enum_type: "RtkBaselineCoordinateSystem",
13875                value: tmp as u32,
13876            })?;
13877        Ok(__struct)
13878    }
13879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13880        let mut __tmp = BytesMut::new(bytes);
13881        #[allow(clippy::absurd_extreme_comparisons)]
13882        #[allow(unused_comparisons)]
13883        if __tmp.remaining() < Self::ENCODED_LEN {
13884            panic!(
13885                "buffer is too small (need {} bytes, but got {})",
13886                Self::ENCODED_LEN,
13887                __tmp.remaining(),
13888            )
13889        }
13890        __tmp.put_u32_le(self.time_last_baseline_ms);
13891        __tmp.put_u32_le(self.tow);
13892        __tmp.put_i32_le(self.baseline_a_mm);
13893        __tmp.put_i32_le(self.baseline_b_mm);
13894        __tmp.put_i32_le(self.baseline_c_mm);
13895        __tmp.put_u32_le(self.accuracy);
13896        __tmp.put_i32_le(self.iar_num_hypotheses);
13897        __tmp.put_u16_le(self.wn);
13898        __tmp.put_u8(self.rtk_receiver_id);
13899        __tmp.put_u8(self.rtk_health);
13900        __tmp.put_u8(self.rtk_rate);
13901        __tmp.put_u8(self.nsats);
13902        __tmp.put_u8(self.baseline_coords_type as u8);
13903        if matches!(version, MavlinkVersion::V2) {
13904            let len = __tmp.len();
13905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13906        } else {
13907            __tmp.len()
13908        }
13909    }
13910}
13911#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13912#[doc = ""]
13913#[doc = "ID: 49"]
13914#[derive(Debug, Clone, PartialEq)]
13915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13917#[cfg_attr(feature = "ts", derive(TS))]
13918#[cfg_attr(feature = "ts", ts(export))]
13919pub struct GPS_GLOBAL_ORIGIN_DATA {
13920    #[doc = "Latitude (WGS84)"]
13921    pub latitude: i32,
13922    #[doc = "Longitude (WGS84)"]
13923    pub longitude: i32,
13924    #[doc = "Altitude (MSL). Positive for up."]
13925    pub altitude: i32,
13926    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13928    pub time_usec: u64,
13929}
13930impl GPS_GLOBAL_ORIGIN_DATA {
13931    pub const ENCODED_LEN: usize = 20usize;
13932    pub const DEFAULT: Self = Self {
13933        latitude: 0_i32,
13934        longitude: 0_i32,
13935        altitude: 0_i32,
13936        time_usec: 0_u64,
13937    };
13938    #[cfg(feature = "arbitrary")]
13939    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13940        use arbitrary::{Arbitrary, Unstructured};
13941        let mut buf = [0u8; 1024];
13942        rng.fill_bytes(&mut buf);
13943        let mut unstructured = Unstructured::new(&buf);
13944        Self::arbitrary(&mut unstructured).unwrap_or_default()
13945    }
13946}
13947impl Default for GPS_GLOBAL_ORIGIN_DATA {
13948    fn default() -> Self {
13949        Self::DEFAULT.clone()
13950    }
13951}
13952impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13953    type Message = MavMessage;
13954    const ID: u32 = 49u32;
13955    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13956    const EXTRA_CRC: u8 = 39u8;
13957    const ENCODED_LEN: usize = 20usize;
13958    fn deser(
13959        _version: MavlinkVersion,
13960        __input: &[u8],
13961    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13962        let avail_len = __input.len();
13963        let mut payload_buf = [0; Self::ENCODED_LEN];
13964        let mut buf = if avail_len < Self::ENCODED_LEN {
13965            payload_buf[0..avail_len].copy_from_slice(__input);
13966            Bytes::new(&payload_buf)
13967        } else {
13968            Bytes::new(__input)
13969        };
13970        let mut __struct = Self::default();
13971        __struct.latitude = buf.get_i32_le();
13972        __struct.longitude = buf.get_i32_le();
13973        __struct.altitude = buf.get_i32_le();
13974        __struct.time_usec = buf.get_u64_le();
13975        Ok(__struct)
13976    }
13977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13978        let mut __tmp = BytesMut::new(bytes);
13979        #[allow(clippy::absurd_extreme_comparisons)]
13980        #[allow(unused_comparisons)]
13981        if __tmp.remaining() < Self::ENCODED_LEN {
13982            panic!(
13983                "buffer is too small (need {} bytes, but got {})",
13984                Self::ENCODED_LEN,
13985                __tmp.remaining(),
13986            )
13987        }
13988        __tmp.put_i32_le(self.latitude);
13989        __tmp.put_i32_le(self.longitude);
13990        __tmp.put_i32_le(self.altitude);
13991        if matches!(version, MavlinkVersion::V2) {
13992            __tmp.put_u64_le(self.time_usec);
13993            let len = __tmp.len();
13994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13995        } else {
13996            __tmp.len()
13997        }
13998    }
13999}
14000#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14001#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14002#[doc = ""]
14003#[doc = "ID: 123"]
14004#[derive(Debug, Clone, PartialEq)]
14005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14007#[cfg_attr(feature = "ts", derive(TS))]
14008#[cfg_attr(feature = "ts", ts(export))]
14009pub struct GPS_INJECT_DATA_DATA {
14010    #[doc = "System ID"]
14011    pub target_system: u8,
14012    #[doc = "Component ID"]
14013    pub target_component: u8,
14014    #[doc = "Data length"]
14015    pub len: u8,
14016    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14017    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14018    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14019    pub data: [u8; 110],
14020}
14021impl GPS_INJECT_DATA_DATA {
14022    pub const ENCODED_LEN: usize = 113usize;
14023    pub const DEFAULT: Self = Self {
14024        target_system: 0_u8,
14025        target_component: 0_u8,
14026        len: 0_u8,
14027        data: [0_u8; 110usize],
14028    };
14029    #[cfg(feature = "arbitrary")]
14030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14031        use arbitrary::{Arbitrary, Unstructured};
14032        let mut buf = [0u8; 1024];
14033        rng.fill_bytes(&mut buf);
14034        let mut unstructured = Unstructured::new(&buf);
14035        Self::arbitrary(&mut unstructured).unwrap_or_default()
14036    }
14037}
14038impl Default for GPS_INJECT_DATA_DATA {
14039    fn default() -> Self {
14040        Self::DEFAULT.clone()
14041    }
14042}
14043impl MessageData for GPS_INJECT_DATA_DATA {
14044    type Message = MavMessage;
14045    const ID: u32 = 123u32;
14046    const NAME: &'static str = "GPS_INJECT_DATA";
14047    const EXTRA_CRC: u8 = 250u8;
14048    const ENCODED_LEN: usize = 113usize;
14049    fn deser(
14050        _version: MavlinkVersion,
14051        __input: &[u8],
14052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14053        let avail_len = __input.len();
14054        let mut payload_buf = [0; Self::ENCODED_LEN];
14055        let mut buf = if avail_len < Self::ENCODED_LEN {
14056            payload_buf[0..avail_len].copy_from_slice(__input);
14057            Bytes::new(&payload_buf)
14058        } else {
14059            Bytes::new(__input)
14060        };
14061        let mut __struct = Self::default();
14062        __struct.target_system = buf.get_u8();
14063        __struct.target_component = buf.get_u8();
14064        __struct.len = buf.get_u8();
14065        for v in &mut __struct.data {
14066            let val = buf.get_u8();
14067            *v = val;
14068        }
14069        Ok(__struct)
14070    }
14071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14072        let mut __tmp = BytesMut::new(bytes);
14073        #[allow(clippy::absurd_extreme_comparisons)]
14074        #[allow(unused_comparisons)]
14075        if __tmp.remaining() < Self::ENCODED_LEN {
14076            panic!(
14077                "buffer is too small (need {} bytes, but got {})",
14078                Self::ENCODED_LEN,
14079                __tmp.remaining(),
14080            )
14081        }
14082        __tmp.put_u8(self.target_system);
14083        __tmp.put_u8(self.target_component);
14084        __tmp.put_u8(self.len);
14085        for val in &self.data {
14086            __tmp.put_u8(*val);
14087        }
14088        if matches!(version, MavlinkVersion::V2) {
14089            let len = __tmp.len();
14090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14091        } else {
14092            __tmp.len()
14093        }
14094    }
14095}
14096#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14097#[doc = ""]
14098#[doc = "ID: 232"]
14099#[derive(Debug, Clone, PartialEq)]
14100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14102#[cfg_attr(feature = "ts", derive(TS))]
14103#[cfg_attr(feature = "ts", ts(export))]
14104pub struct GPS_INPUT_DATA {
14105    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14106    pub time_usec: u64,
14107    #[doc = "GPS time (from start of GPS week)"]
14108    pub time_week_ms: u32,
14109    #[doc = "Latitude (WGS84)"]
14110    pub lat: i32,
14111    #[doc = "Longitude (WGS84)"]
14112    pub lon: i32,
14113    #[doc = "Altitude (MSL). Positive for up."]
14114    pub alt: f32,
14115    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14116    pub hdop: f32,
14117    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14118    pub vdop: f32,
14119    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14120    pub vn: f32,
14121    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14122    pub ve: f32,
14123    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14124    pub vd: f32,
14125    #[doc = "GPS speed accuracy"]
14126    pub speed_accuracy: f32,
14127    #[doc = "GPS horizontal accuracy"]
14128    pub horiz_accuracy: f32,
14129    #[doc = "GPS vertical accuracy"]
14130    pub vert_accuracy: f32,
14131    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14132    pub ignore_flags: GpsInputIgnoreFlags,
14133    #[doc = "GPS week number"]
14134    pub time_week: u16,
14135    #[doc = "ID of the GPS for multiple GPS inputs"]
14136    pub gps_id: u8,
14137    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14138    pub fix_type: u8,
14139    #[doc = "Number of satellites visible."]
14140    pub satellites_visible: u8,
14141    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14143    pub yaw: u16,
14144}
14145impl GPS_INPUT_DATA {
14146    pub const ENCODED_LEN: usize = 65usize;
14147    pub const DEFAULT: Self = Self {
14148        time_usec: 0_u64,
14149        time_week_ms: 0_u32,
14150        lat: 0_i32,
14151        lon: 0_i32,
14152        alt: 0.0_f32,
14153        hdop: 0.0_f32,
14154        vdop: 0.0_f32,
14155        vn: 0.0_f32,
14156        ve: 0.0_f32,
14157        vd: 0.0_f32,
14158        speed_accuracy: 0.0_f32,
14159        horiz_accuracy: 0.0_f32,
14160        vert_accuracy: 0.0_f32,
14161        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14162        time_week: 0_u16,
14163        gps_id: 0_u8,
14164        fix_type: 0_u8,
14165        satellites_visible: 0_u8,
14166        yaw: 0_u16,
14167    };
14168    #[cfg(feature = "arbitrary")]
14169    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14170        use arbitrary::{Arbitrary, Unstructured};
14171        let mut buf = [0u8; 1024];
14172        rng.fill_bytes(&mut buf);
14173        let mut unstructured = Unstructured::new(&buf);
14174        Self::arbitrary(&mut unstructured).unwrap_or_default()
14175    }
14176}
14177impl Default for GPS_INPUT_DATA {
14178    fn default() -> Self {
14179        Self::DEFAULT.clone()
14180    }
14181}
14182impl MessageData for GPS_INPUT_DATA {
14183    type Message = MavMessage;
14184    const ID: u32 = 232u32;
14185    const NAME: &'static str = "GPS_INPUT";
14186    const EXTRA_CRC: u8 = 151u8;
14187    const ENCODED_LEN: usize = 65usize;
14188    fn deser(
14189        _version: MavlinkVersion,
14190        __input: &[u8],
14191    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14192        let avail_len = __input.len();
14193        let mut payload_buf = [0; Self::ENCODED_LEN];
14194        let mut buf = if avail_len < Self::ENCODED_LEN {
14195            payload_buf[0..avail_len].copy_from_slice(__input);
14196            Bytes::new(&payload_buf)
14197        } else {
14198            Bytes::new(__input)
14199        };
14200        let mut __struct = Self::default();
14201        __struct.time_usec = buf.get_u64_le();
14202        __struct.time_week_ms = buf.get_u32_le();
14203        __struct.lat = buf.get_i32_le();
14204        __struct.lon = buf.get_i32_le();
14205        __struct.alt = buf.get_f32_le();
14206        __struct.hdop = buf.get_f32_le();
14207        __struct.vdop = buf.get_f32_le();
14208        __struct.vn = buf.get_f32_le();
14209        __struct.ve = buf.get_f32_le();
14210        __struct.vd = buf.get_f32_le();
14211        __struct.speed_accuracy = buf.get_f32_le();
14212        __struct.horiz_accuracy = buf.get_f32_le();
14213        __struct.vert_accuracy = buf.get_f32_le();
14214        let tmp = buf.get_u16_le();
14215        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14216            tmp & GpsInputIgnoreFlags::all().bits(),
14217        )
14218        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14219            flag_type: "GpsInputIgnoreFlags",
14220            value: tmp as u32,
14221        })?;
14222        __struct.time_week = buf.get_u16_le();
14223        __struct.gps_id = buf.get_u8();
14224        __struct.fix_type = buf.get_u8();
14225        __struct.satellites_visible = buf.get_u8();
14226        __struct.yaw = buf.get_u16_le();
14227        Ok(__struct)
14228    }
14229    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14230        let mut __tmp = BytesMut::new(bytes);
14231        #[allow(clippy::absurd_extreme_comparisons)]
14232        #[allow(unused_comparisons)]
14233        if __tmp.remaining() < Self::ENCODED_LEN {
14234            panic!(
14235                "buffer is too small (need {} bytes, but got {})",
14236                Self::ENCODED_LEN,
14237                __tmp.remaining(),
14238            )
14239        }
14240        __tmp.put_u64_le(self.time_usec);
14241        __tmp.put_u32_le(self.time_week_ms);
14242        __tmp.put_i32_le(self.lat);
14243        __tmp.put_i32_le(self.lon);
14244        __tmp.put_f32_le(self.alt);
14245        __tmp.put_f32_le(self.hdop);
14246        __tmp.put_f32_le(self.vdop);
14247        __tmp.put_f32_le(self.vn);
14248        __tmp.put_f32_le(self.ve);
14249        __tmp.put_f32_le(self.vd);
14250        __tmp.put_f32_le(self.speed_accuracy);
14251        __tmp.put_f32_le(self.horiz_accuracy);
14252        __tmp.put_f32_le(self.vert_accuracy);
14253        __tmp.put_u16_le(self.ignore_flags.bits());
14254        __tmp.put_u16_le(self.time_week);
14255        __tmp.put_u8(self.gps_id);
14256        __tmp.put_u8(self.fix_type);
14257        __tmp.put_u8(self.satellites_visible);
14258        if matches!(version, MavlinkVersion::V2) {
14259            __tmp.put_u16_le(self.yaw);
14260            let len = __tmp.len();
14261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14262        } else {
14263            __tmp.len()
14264        }
14265    }
14266}
14267#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14268#[doc = ""]
14269#[doc = "ID: 24"]
14270#[derive(Debug, Clone, PartialEq)]
14271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14273#[cfg_attr(feature = "ts", derive(TS))]
14274#[cfg_attr(feature = "ts", ts(export))]
14275pub struct GPS_RAW_INT_DATA {
14276    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14277    pub time_usec: u64,
14278    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14279    pub lat: i32,
14280    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14281    pub lon: i32,
14282    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14283    pub alt: i32,
14284    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14285    pub eph: u16,
14286    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14287    pub epv: u16,
14288    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14289    pub vel: u16,
14290    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14291    pub cog: u16,
14292    #[doc = "GPS fix type."]
14293    pub fix_type: GpsFixType,
14294    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14295    pub satellites_visible: u8,
14296    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14297    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14298    pub alt_ellipsoid: i32,
14299    #[doc = "Position uncertainty."]
14300    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14301    pub h_acc: u32,
14302    #[doc = "Altitude uncertainty."]
14303    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14304    pub v_acc: u32,
14305    #[doc = "Speed uncertainty."]
14306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14307    pub vel_acc: u32,
14308    #[doc = "Heading / track uncertainty"]
14309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14310    pub hdg_acc: u32,
14311    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14312    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14313    pub yaw: u16,
14314}
14315impl GPS_RAW_INT_DATA {
14316    pub const ENCODED_LEN: usize = 52usize;
14317    pub const DEFAULT: Self = Self {
14318        time_usec: 0_u64,
14319        lat: 0_i32,
14320        lon: 0_i32,
14321        alt: 0_i32,
14322        eph: 0_u16,
14323        epv: 0_u16,
14324        vel: 0_u16,
14325        cog: 0_u16,
14326        fix_type: GpsFixType::DEFAULT,
14327        satellites_visible: 0_u8,
14328        alt_ellipsoid: 0_i32,
14329        h_acc: 0_u32,
14330        v_acc: 0_u32,
14331        vel_acc: 0_u32,
14332        hdg_acc: 0_u32,
14333        yaw: 0_u16,
14334    };
14335    #[cfg(feature = "arbitrary")]
14336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14337        use arbitrary::{Arbitrary, Unstructured};
14338        let mut buf = [0u8; 1024];
14339        rng.fill_bytes(&mut buf);
14340        let mut unstructured = Unstructured::new(&buf);
14341        Self::arbitrary(&mut unstructured).unwrap_or_default()
14342    }
14343}
14344impl Default for GPS_RAW_INT_DATA {
14345    fn default() -> Self {
14346        Self::DEFAULT.clone()
14347    }
14348}
14349impl MessageData for GPS_RAW_INT_DATA {
14350    type Message = MavMessage;
14351    const ID: u32 = 24u32;
14352    const NAME: &'static str = "GPS_RAW_INT";
14353    const EXTRA_CRC: u8 = 24u8;
14354    const ENCODED_LEN: usize = 52usize;
14355    fn deser(
14356        _version: MavlinkVersion,
14357        __input: &[u8],
14358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14359        let avail_len = __input.len();
14360        let mut payload_buf = [0; Self::ENCODED_LEN];
14361        let mut buf = if avail_len < Self::ENCODED_LEN {
14362            payload_buf[0..avail_len].copy_from_slice(__input);
14363            Bytes::new(&payload_buf)
14364        } else {
14365            Bytes::new(__input)
14366        };
14367        let mut __struct = Self::default();
14368        __struct.time_usec = buf.get_u64_le();
14369        __struct.lat = buf.get_i32_le();
14370        __struct.lon = buf.get_i32_le();
14371        __struct.alt = buf.get_i32_le();
14372        __struct.eph = buf.get_u16_le();
14373        __struct.epv = buf.get_u16_le();
14374        __struct.vel = buf.get_u16_le();
14375        __struct.cog = buf.get_u16_le();
14376        let tmp = buf.get_u8();
14377        __struct.fix_type =
14378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14379                enum_type: "GpsFixType",
14380                value: tmp as u32,
14381            })?;
14382        __struct.satellites_visible = buf.get_u8();
14383        __struct.alt_ellipsoid = buf.get_i32_le();
14384        __struct.h_acc = buf.get_u32_le();
14385        __struct.v_acc = buf.get_u32_le();
14386        __struct.vel_acc = buf.get_u32_le();
14387        __struct.hdg_acc = buf.get_u32_le();
14388        __struct.yaw = buf.get_u16_le();
14389        Ok(__struct)
14390    }
14391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14392        let mut __tmp = BytesMut::new(bytes);
14393        #[allow(clippy::absurd_extreme_comparisons)]
14394        #[allow(unused_comparisons)]
14395        if __tmp.remaining() < Self::ENCODED_LEN {
14396            panic!(
14397                "buffer is too small (need {} bytes, but got {})",
14398                Self::ENCODED_LEN,
14399                __tmp.remaining(),
14400            )
14401        }
14402        __tmp.put_u64_le(self.time_usec);
14403        __tmp.put_i32_le(self.lat);
14404        __tmp.put_i32_le(self.lon);
14405        __tmp.put_i32_le(self.alt);
14406        __tmp.put_u16_le(self.eph);
14407        __tmp.put_u16_le(self.epv);
14408        __tmp.put_u16_le(self.vel);
14409        __tmp.put_u16_le(self.cog);
14410        __tmp.put_u8(self.fix_type as u8);
14411        __tmp.put_u8(self.satellites_visible);
14412        if matches!(version, MavlinkVersion::V2) {
14413            __tmp.put_i32_le(self.alt_ellipsoid);
14414            __tmp.put_u32_le(self.h_acc);
14415            __tmp.put_u32_le(self.v_acc);
14416            __tmp.put_u32_le(self.vel_acc);
14417            __tmp.put_u32_le(self.hdg_acc);
14418            __tmp.put_u16_le(self.yaw);
14419            let len = __tmp.len();
14420            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14421        } else {
14422            __tmp.len()
14423        }
14424    }
14425}
14426#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14427#[doc = ""]
14428#[doc = "ID: 233"]
14429#[derive(Debug, Clone, PartialEq)]
14430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14432#[cfg_attr(feature = "ts", derive(TS))]
14433#[cfg_attr(feature = "ts", ts(export))]
14434pub struct GPS_RTCM_DATA_DATA {
14435    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14436    pub flags: u8,
14437    #[doc = "data length"]
14438    pub len: u8,
14439    #[doc = "RTCM message (may be fragmented)"]
14440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14442    pub data: [u8; 180],
14443}
14444impl GPS_RTCM_DATA_DATA {
14445    pub const ENCODED_LEN: usize = 182usize;
14446    pub const DEFAULT: Self = Self {
14447        flags: 0_u8,
14448        len: 0_u8,
14449        data: [0_u8; 180usize],
14450    };
14451    #[cfg(feature = "arbitrary")]
14452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14453        use arbitrary::{Arbitrary, Unstructured};
14454        let mut buf = [0u8; 1024];
14455        rng.fill_bytes(&mut buf);
14456        let mut unstructured = Unstructured::new(&buf);
14457        Self::arbitrary(&mut unstructured).unwrap_or_default()
14458    }
14459}
14460impl Default for GPS_RTCM_DATA_DATA {
14461    fn default() -> Self {
14462        Self::DEFAULT.clone()
14463    }
14464}
14465impl MessageData for GPS_RTCM_DATA_DATA {
14466    type Message = MavMessage;
14467    const ID: u32 = 233u32;
14468    const NAME: &'static str = "GPS_RTCM_DATA";
14469    const EXTRA_CRC: u8 = 35u8;
14470    const ENCODED_LEN: usize = 182usize;
14471    fn deser(
14472        _version: MavlinkVersion,
14473        __input: &[u8],
14474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14475        let avail_len = __input.len();
14476        let mut payload_buf = [0; Self::ENCODED_LEN];
14477        let mut buf = if avail_len < Self::ENCODED_LEN {
14478            payload_buf[0..avail_len].copy_from_slice(__input);
14479            Bytes::new(&payload_buf)
14480        } else {
14481            Bytes::new(__input)
14482        };
14483        let mut __struct = Self::default();
14484        __struct.flags = buf.get_u8();
14485        __struct.len = buf.get_u8();
14486        for v in &mut __struct.data {
14487            let val = buf.get_u8();
14488            *v = val;
14489        }
14490        Ok(__struct)
14491    }
14492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14493        let mut __tmp = BytesMut::new(bytes);
14494        #[allow(clippy::absurd_extreme_comparisons)]
14495        #[allow(unused_comparisons)]
14496        if __tmp.remaining() < Self::ENCODED_LEN {
14497            panic!(
14498                "buffer is too small (need {} bytes, but got {})",
14499                Self::ENCODED_LEN,
14500                __tmp.remaining(),
14501            )
14502        }
14503        __tmp.put_u8(self.flags);
14504        __tmp.put_u8(self.len);
14505        for val in &self.data {
14506            __tmp.put_u8(*val);
14507        }
14508        if matches!(version, MavlinkVersion::V2) {
14509            let len = __tmp.len();
14510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14511        } else {
14512            __tmp.len()
14513        }
14514    }
14515}
14516#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14517#[doc = ""]
14518#[doc = "ID: 127"]
14519#[derive(Debug, Clone, PartialEq)]
14520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14522#[cfg_attr(feature = "ts", derive(TS))]
14523#[cfg_attr(feature = "ts", ts(export))]
14524pub struct GPS_RTK_DATA {
14525    #[doc = "Time since boot of last baseline message received."]
14526    pub time_last_baseline_ms: u32,
14527    #[doc = "GPS Time of Week of last baseline"]
14528    pub tow: u32,
14529    #[doc = "Current baseline in ECEF x or NED north component."]
14530    pub baseline_a_mm: i32,
14531    #[doc = "Current baseline in ECEF y or NED east component."]
14532    pub baseline_b_mm: i32,
14533    #[doc = "Current baseline in ECEF z or NED down component."]
14534    pub baseline_c_mm: i32,
14535    #[doc = "Current estimate of baseline accuracy."]
14536    pub accuracy: u32,
14537    #[doc = "Current number of integer ambiguity hypotheses."]
14538    pub iar_num_hypotheses: i32,
14539    #[doc = "GPS Week Number of last baseline"]
14540    pub wn: u16,
14541    #[doc = "Identification of connected RTK receiver."]
14542    pub rtk_receiver_id: u8,
14543    #[doc = "GPS-specific health report for RTK data."]
14544    pub rtk_health: u8,
14545    #[doc = "Rate of baseline messages being received by GPS"]
14546    pub rtk_rate: u8,
14547    #[doc = "Current number of sats used for RTK calculation."]
14548    pub nsats: u8,
14549    #[doc = "Coordinate system of baseline"]
14550    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14551}
14552impl GPS_RTK_DATA {
14553    pub const ENCODED_LEN: usize = 35usize;
14554    pub const DEFAULT: Self = Self {
14555        time_last_baseline_ms: 0_u32,
14556        tow: 0_u32,
14557        baseline_a_mm: 0_i32,
14558        baseline_b_mm: 0_i32,
14559        baseline_c_mm: 0_i32,
14560        accuracy: 0_u32,
14561        iar_num_hypotheses: 0_i32,
14562        wn: 0_u16,
14563        rtk_receiver_id: 0_u8,
14564        rtk_health: 0_u8,
14565        rtk_rate: 0_u8,
14566        nsats: 0_u8,
14567        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14568    };
14569    #[cfg(feature = "arbitrary")]
14570    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14571        use arbitrary::{Arbitrary, Unstructured};
14572        let mut buf = [0u8; 1024];
14573        rng.fill_bytes(&mut buf);
14574        let mut unstructured = Unstructured::new(&buf);
14575        Self::arbitrary(&mut unstructured).unwrap_or_default()
14576    }
14577}
14578impl Default for GPS_RTK_DATA {
14579    fn default() -> Self {
14580        Self::DEFAULT.clone()
14581    }
14582}
14583impl MessageData for GPS_RTK_DATA {
14584    type Message = MavMessage;
14585    const ID: u32 = 127u32;
14586    const NAME: &'static str = "GPS_RTK";
14587    const EXTRA_CRC: u8 = 25u8;
14588    const ENCODED_LEN: usize = 35usize;
14589    fn deser(
14590        _version: MavlinkVersion,
14591        __input: &[u8],
14592    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14593        let avail_len = __input.len();
14594        let mut payload_buf = [0; Self::ENCODED_LEN];
14595        let mut buf = if avail_len < Self::ENCODED_LEN {
14596            payload_buf[0..avail_len].copy_from_slice(__input);
14597            Bytes::new(&payload_buf)
14598        } else {
14599            Bytes::new(__input)
14600        };
14601        let mut __struct = Self::default();
14602        __struct.time_last_baseline_ms = buf.get_u32_le();
14603        __struct.tow = buf.get_u32_le();
14604        __struct.baseline_a_mm = buf.get_i32_le();
14605        __struct.baseline_b_mm = buf.get_i32_le();
14606        __struct.baseline_c_mm = buf.get_i32_le();
14607        __struct.accuracy = buf.get_u32_le();
14608        __struct.iar_num_hypotheses = buf.get_i32_le();
14609        __struct.wn = buf.get_u16_le();
14610        __struct.rtk_receiver_id = buf.get_u8();
14611        __struct.rtk_health = buf.get_u8();
14612        __struct.rtk_rate = buf.get_u8();
14613        __struct.nsats = buf.get_u8();
14614        let tmp = buf.get_u8();
14615        __struct.baseline_coords_type =
14616            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14617                enum_type: "RtkBaselineCoordinateSystem",
14618                value: tmp as u32,
14619            })?;
14620        Ok(__struct)
14621    }
14622    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14623        let mut __tmp = BytesMut::new(bytes);
14624        #[allow(clippy::absurd_extreme_comparisons)]
14625        #[allow(unused_comparisons)]
14626        if __tmp.remaining() < Self::ENCODED_LEN {
14627            panic!(
14628                "buffer is too small (need {} bytes, but got {})",
14629                Self::ENCODED_LEN,
14630                __tmp.remaining(),
14631            )
14632        }
14633        __tmp.put_u32_le(self.time_last_baseline_ms);
14634        __tmp.put_u32_le(self.tow);
14635        __tmp.put_i32_le(self.baseline_a_mm);
14636        __tmp.put_i32_le(self.baseline_b_mm);
14637        __tmp.put_i32_le(self.baseline_c_mm);
14638        __tmp.put_u32_le(self.accuracy);
14639        __tmp.put_i32_le(self.iar_num_hypotheses);
14640        __tmp.put_u16_le(self.wn);
14641        __tmp.put_u8(self.rtk_receiver_id);
14642        __tmp.put_u8(self.rtk_health);
14643        __tmp.put_u8(self.rtk_rate);
14644        __tmp.put_u8(self.nsats);
14645        __tmp.put_u8(self.baseline_coords_type as u8);
14646        if matches!(version, MavlinkVersion::V2) {
14647            let len = __tmp.len();
14648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14649        } else {
14650            __tmp.len()
14651        }
14652    }
14653}
14654#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14655#[doc = ""]
14656#[doc = "ID: 25"]
14657#[derive(Debug, Clone, PartialEq)]
14658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14660#[cfg_attr(feature = "ts", derive(TS))]
14661#[cfg_attr(feature = "ts", ts(export))]
14662pub struct GPS_STATUS_DATA {
14663    #[doc = "Number of satellites visible"]
14664    pub satellites_visible: u8,
14665    #[doc = "Global satellite ID"]
14666    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14667    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14668    pub satellite_prn: [u8; 20],
14669    #[doc = "0: Satellite not used, 1: used for localization"]
14670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14671    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14672    pub satellite_used: [u8; 20],
14673    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14674    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14675    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14676    pub satellite_elevation: [u8; 20],
14677    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14679    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14680    pub satellite_azimuth: [u8; 20],
14681    #[doc = "Signal to noise ratio of satellite"]
14682    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14683    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14684    pub satellite_snr: [u8; 20],
14685}
14686impl GPS_STATUS_DATA {
14687    pub const ENCODED_LEN: usize = 101usize;
14688    pub const DEFAULT: Self = Self {
14689        satellites_visible: 0_u8,
14690        satellite_prn: [0_u8; 20usize],
14691        satellite_used: [0_u8; 20usize],
14692        satellite_elevation: [0_u8; 20usize],
14693        satellite_azimuth: [0_u8; 20usize],
14694        satellite_snr: [0_u8; 20usize],
14695    };
14696    #[cfg(feature = "arbitrary")]
14697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14698        use arbitrary::{Arbitrary, Unstructured};
14699        let mut buf = [0u8; 1024];
14700        rng.fill_bytes(&mut buf);
14701        let mut unstructured = Unstructured::new(&buf);
14702        Self::arbitrary(&mut unstructured).unwrap_or_default()
14703    }
14704}
14705impl Default for GPS_STATUS_DATA {
14706    fn default() -> Self {
14707        Self::DEFAULT.clone()
14708    }
14709}
14710impl MessageData for GPS_STATUS_DATA {
14711    type Message = MavMessage;
14712    const ID: u32 = 25u32;
14713    const NAME: &'static str = "GPS_STATUS";
14714    const EXTRA_CRC: u8 = 23u8;
14715    const ENCODED_LEN: usize = 101usize;
14716    fn deser(
14717        _version: MavlinkVersion,
14718        __input: &[u8],
14719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14720        let avail_len = __input.len();
14721        let mut payload_buf = [0; Self::ENCODED_LEN];
14722        let mut buf = if avail_len < Self::ENCODED_LEN {
14723            payload_buf[0..avail_len].copy_from_slice(__input);
14724            Bytes::new(&payload_buf)
14725        } else {
14726            Bytes::new(__input)
14727        };
14728        let mut __struct = Self::default();
14729        __struct.satellites_visible = buf.get_u8();
14730        for v in &mut __struct.satellite_prn {
14731            let val = buf.get_u8();
14732            *v = val;
14733        }
14734        for v in &mut __struct.satellite_used {
14735            let val = buf.get_u8();
14736            *v = val;
14737        }
14738        for v in &mut __struct.satellite_elevation {
14739            let val = buf.get_u8();
14740            *v = val;
14741        }
14742        for v in &mut __struct.satellite_azimuth {
14743            let val = buf.get_u8();
14744            *v = val;
14745        }
14746        for v in &mut __struct.satellite_snr {
14747            let val = buf.get_u8();
14748            *v = val;
14749        }
14750        Ok(__struct)
14751    }
14752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14753        let mut __tmp = BytesMut::new(bytes);
14754        #[allow(clippy::absurd_extreme_comparisons)]
14755        #[allow(unused_comparisons)]
14756        if __tmp.remaining() < Self::ENCODED_LEN {
14757            panic!(
14758                "buffer is too small (need {} bytes, but got {})",
14759                Self::ENCODED_LEN,
14760                __tmp.remaining(),
14761            )
14762        }
14763        __tmp.put_u8(self.satellites_visible);
14764        for val in &self.satellite_prn {
14765            __tmp.put_u8(*val);
14766        }
14767        for val in &self.satellite_used {
14768            __tmp.put_u8(*val);
14769        }
14770        for val in &self.satellite_elevation {
14771            __tmp.put_u8(*val);
14772        }
14773        for val in &self.satellite_azimuth {
14774            __tmp.put_u8(*val);
14775        }
14776        for val in &self.satellite_snr {
14777            __tmp.put_u8(*val);
14778        }
14779        if matches!(version, MavlinkVersion::V2) {
14780            let len = __tmp.len();
14781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14782        } else {
14783            __tmp.len()
14784        }
14785    }
14786}
14787#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14788#[doc = ""]
14789#[doc = "ID: 0"]
14790#[derive(Debug, Clone, PartialEq)]
14791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14793#[cfg_attr(feature = "ts", derive(TS))]
14794#[cfg_attr(feature = "ts", ts(export))]
14795pub struct HEARTBEAT_DATA {
14796    #[doc = "A bitfield for use for autopilot-specific flags"]
14797    pub custom_mode: u32,
14798    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14799    pub mavtype: MavType,
14800    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14801    pub autopilot: MavAutopilot,
14802    #[doc = "System mode bitmap."]
14803    pub base_mode: MavModeFlag,
14804    #[doc = "System status flag."]
14805    pub system_status: MavState,
14806    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14807    pub mavlink_version: u8,
14808}
14809impl HEARTBEAT_DATA {
14810    pub const ENCODED_LEN: usize = 9usize;
14811    pub const DEFAULT: Self = Self {
14812        custom_mode: 0_u32,
14813        mavtype: MavType::DEFAULT,
14814        autopilot: MavAutopilot::DEFAULT,
14815        base_mode: MavModeFlag::DEFAULT,
14816        system_status: MavState::DEFAULT,
14817        mavlink_version: MINOR_MAVLINK_VERSION,
14818    };
14819    #[cfg(feature = "arbitrary")]
14820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14821        use arbitrary::{Arbitrary, Unstructured};
14822        let mut buf = [0u8; 1024];
14823        rng.fill_bytes(&mut buf);
14824        let mut unstructured = Unstructured::new(&buf);
14825        Self::arbitrary(&mut unstructured).unwrap_or_default()
14826    }
14827}
14828impl Default for HEARTBEAT_DATA {
14829    fn default() -> Self {
14830        Self::DEFAULT.clone()
14831    }
14832}
14833impl MessageData for HEARTBEAT_DATA {
14834    type Message = MavMessage;
14835    const ID: u32 = 0u32;
14836    const NAME: &'static str = "HEARTBEAT";
14837    const EXTRA_CRC: u8 = 50u8;
14838    const ENCODED_LEN: usize = 9usize;
14839    fn deser(
14840        _version: MavlinkVersion,
14841        __input: &[u8],
14842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14843        let avail_len = __input.len();
14844        let mut payload_buf = [0; Self::ENCODED_LEN];
14845        let mut buf = if avail_len < Self::ENCODED_LEN {
14846            payload_buf[0..avail_len].copy_from_slice(__input);
14847            Bytes::new(&payload_buf)
14848        } else {
14849            Bytes::new(__input)
14850        };
14851        let mut __struct = Self::default();
14852        __struct.custom_mode = buf.get_u32_le();
14853        let tmp = buf.get_u8();
14854        __struct.mavtype =
14855            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14856                enum_type: "MavType",
14857                value: tmp as u32,
14858            })?;
14859        let tmp = buf.get_u8();
14860        __struct.autopilot =
14861            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14862                enum_type: "MavAutopilot",
14863                value: tmp as u32,
14864            })?;
14865        let tmp = buf.get_u8();
14866        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14867            ::mavlink_core::error::ParserError::InvalidFlag {
14868                flag_type: "MavModeFlag",
14869                value: tmp as u32,
14870            },
14871        )?;
14872        let tmp = buf.get_u8();
14873        __struct.system_status =
14874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14875                enum_type: "MavState",
14876                value: tmp as u32,
14877            })?;
14878        __struct.mavlink_version = buf.get_u8();
14879        Ok(__struct)
14880    }
14881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14882        let mut __tmp = BytesMut::new(bytes);
14883        #[allow(clippy::absurd_extreme_comparisons)]
14884        #[allow(unused_comparisons)]
14885        if __tmp.remaining() < Self::ENCODED_LEN {
14886            panic!(
14887                "buffer is too small (need {} bytes, but got {})",
14888                Self::ENCODED_LEN,
14889                __tmp.remaining(),
14890            )
14891        }
14892        __tmp.put_u32_le(self.custom_mode);
14893        __tmp.put_u8(self.mavtype as u8);
14894        __tmp.put_u8(self.autopilot as u8);
14895        __tmp.put_u8(self.base_mode.bits());
14896        __tmp.put_u8(self.system_status as u8);
14897        __tmp.put_u8(self.mavlink_version);
14898        if matches!(version, MavlinkVersion::V2) {
14899            let len = __tmp.len();
14900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14901        } else {
14902            __tmp.len()
14903        }
14904    }
14905}
14906#[doc = "The IMU readings in SI units in NED body frame."]
14907#[doc = ""]
14908#[doc = "ID: 105"]
14909#[derive(Debug, Clone, PartialEq)]
14910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14912#[cfg_attr(feature = "ts", derive(TS))]
14913#[cfg_attr(feature = "ts", ts(export))]
14914pub struct HIGHRES_IMU_DATA {
14915    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14916    pub time_usec: u64,
14917    #[doc = "X acceleration"]
14918    pub xacc: f32,
14919    #[doc = "Y acceleration"]
14920    pub yacc: f32,
14921    #[doc = "Z acceleration"]
14922    pub zacc: f32,
14923    #[doc = "Angular speed around X axis"]
14924    pub xgyro: f32,
14925    #[doc = "Angular speed around Y axis"]
14926    pub ygyro: f32,
14927    #[doc = "Angular speed around Z axis"]
14928    pub zgyro: f32,
14929    #[doc = "X Magnetic field"]
14930    pub xmag: f32,
14931    #[doc = "Y Magnetic field"]
14932    pub ymag: f32,
14933    #[doc = "Z Magnetic field"]
14934    pub zmag: f32,
14935    #[doc = "Absolute pressure"]
14936    pub abs_pressure: f32,
14937    #[doc = "Differential pressure"]
14938    pub diff_pressure: f32,
14939    #[doc = "Altitude calculated from pressure"]
14940    pub pressure_alt: f32,
14941    #[doc = "Temperature"]
14942    pub temperature: f32,
14943    #[doc = "Bitmap for fields that have updated since last message"]
14944    pub fields_updated: HighresImuUpdatedFlags,
14945    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14946    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14947    pub id: u8,
14948}
14949impl HIGHRES_IMU_DATA {
14950    pub const ENCODED_LEN: usize = 63usize;
14951    pub const DEFAULT: Self = Self {
14952        time_usec: 0_u64,
14953        xacc: 0.0_f32,
14954        yacc: 0.0_f32,
14955        zacc: 0.0_f32,
14956        xgyro: 0.0_f32,
14957        ygyro: 0.0_f32,
14958        zgyro: 0.0_f32,
14959        xmag: 0.0_f32,
14960        ymag: 0.0_f32,
14961        zmag: 0.0_f32,
14962        abs_pressure: 0.0_f32,
14963        diff_pressure: 0.0_f32,
14964        pressure_alt: 0.0_f32,
14965        temperature: 0.0_f32,
14966        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14967        id: 0_u8,
14968    };
14969    #[cfg(feature = "arbitrary")]
14970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14971        use arbitrary::{Arbitrary, Unstructured};
14972        let mut buf = [0u8; 1024];
14973        rng.fill_bytes(&mut buf);
14974        let mut unstructured = Unstructured::new(&buf);
14975        Self::arbitrary(&mut unstructured).unwrap_or_default()
14976    }
14977}
14978impl Default for HIGHRES_IMU_DATA {
14979    fn default() -> Self {
14980        Self::DEFAULT.clone()
14981    }
14982}
14983impl MessageData for HIGHRES_IMU_DATA {
14984    type Message = MavMessage;
14985    const ID: u32 = 105u32;
14986    const NAME: &'static str = "HIGHRES_IMU";
14987    const EXTRA_CRC: u8 = 93u8;
14988    const ENCODED_LEN: usize = 63usize;
14989    fn deser(
14990        _version: MavlinkVersion,
14991        __input: &[u8],
14992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14993        let avail_len = __input.len();
14994        let mut payload_buf = [0; Self::ENCODED_LEN];
14995        let mut buf = if avail_len < Self::ENCODED_LEN {
14996            payload_buf[0..avail_len].copy_from_slice(__input);
14997            Bytes::new(&payload_buf)
14998        } else {
14999            Bytes::new(__input)
15000        };
15001        let mut __struct = Self::default();
15002        __struct.time_usec = buf.get_u64_le();
15003        __struct.xacc = buf.get_f32_le();
15004        __struct.yacc = buf.get_f32_le();
15005        __struct.zacc = buf.get_f32_le();
15006        __struct.xgyro = buf.get_f32_le();
15007        __struct.ygyro = buf.get_f32_le();
15008        __struct.zgyro = buf.get_f32_le();
15009        __struct.xmag = buf.get_f32_le();
15010        __struct.ymag = buf.get_f32_le();
15011        __struct.zmag = buf.get_f32_le();
15012        __struct.abs_pressure = buf.get_f32_le();
15013        __struct.diff_pressure = buf.get_f32_le();
15014        __struct.pressure_alt = buf.get_f32_le();
15015        __struct.temperature = buf.get_f32_le();
15016        let tmp = buf.get_u16_le();
15017        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15018            tmp & HighresImuUpdatedFlags::all().bits(),
15019        )
15020        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15021            flag_type: "HighresImuUpdatedFlags",
15022            value: tmp as u32,
15023        })?;
15024        __struct.id = buf.get_u8();
15025        Ok(__struct)
15026    }
15027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15028        let mut __tmp = BytesMut::new(bytes);
15029        #[allow(clippy::absurd_extreme_comparisons)]
15030        #[allow(unused_comparisons)]
15031        if __tmp.remaining() < Self::ENCODED_LEN {
15032            panic!(
15033                "buffer is too small (need {} bytes, but got {})",
15034                Self::ENCODED_LEN,
15035                __tmp.remaining(),
15036            )
15037        }
15038        __tmp.put_u64_le(self.time_usec);
15039        __tmp.put_f32_le(self.xacc);
15040        __tmp.put_f32_le(self.yacc);
15041        __tmp.put_f32_le(self.zacc);
15042        __tmp.put_f32_le(self.xgyro);
15043        __tmp.put_f32_le(self.ygyro);
15044        __tmp.put_f32_le(self.zgyro);
15045        __tmp.put_f32_le(self.xmag);
15046        __tmp.put_f32_le(self.ymag);
15047        __tmp.put_f32_le(self.zmag);
15048        __tmp.put_f32_le(self.abs_pressure);
15049        __tmp.put_f32_le(self.diff_pressure);
15050        __tmp.put_f32_le(self.pressure_alt);
15051        __tmp.put_f32_le(self.temperature);
15052        __tmp.put_u16_le(self.fields_updated.bits());
15053        if matches!(version, MavlinkVersion::V2) {
15054            __tmp.put_u8(self.id);
15055            let len = __tmp.len();
15056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15057        } else {
15058            __tmp.len()
15059        }
15060    }
15061}
15062#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15063#[doc = "Message appropriate for high latency connections like Iridium."]
15064#[doc = ""]
15065#[doc = "ID: 234"]
15066#[derive(Debug, Clone, PartialEq)]
15067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15069#[cfg_attr(feature = "ts", derive(TS))]
15070#[cfg_attr(feature = "ts", ts(export))]
15071pub struct HIGH_LATENCY_DATA {
15072    #[doc = "A bitfield for use for autopilot-specific flags."]
15073    pub custom_mode: u32,
15074    #[doc = "Latitude"]
15075    pub latitude: i32,
15076    #[doc = "Longitude"]
15077    pub longitude: i32,
15078    #[doc = "roll"]
15079    pub roll: i16,
15080    #[doc = "pitch"]
15081    pub pitch: i16,
15082    #[doc = "heading"]
15083    pub heading: u16,
15084    #[doc = "heading setpoint"]
15085    pub heading_sp: i16,
15086    #[doc = "Altitude above mean sea level"]
15087    pub altitude_amsl: i16,
15088    #[doc = "Altitude setpoint relative to the home position"]
15089    pub altitude_sp: i16,
15090    #[doc = "distance to target"]
15091    pub wp_distance: u16,
15092    #[doc = "Bitmap of enabled system modes."]
15093    pub base_mode: MavModeFlag,
15094    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15095    pub landed_state: MavLandedState,
15096    #[doc = "throttle (percentage)"]
15097    pub throttle: i8,
15098    #[doc = "airspeed"]
15099    pub airspeed: u8,
15100    #[doc = "airspeed setpoint"]
15101    pub airspeed_sp: u8,
15102    #[doc = "groundspeed"]
15103    pub groundspeed: u8,
15104    #[doc = "climb rate"]
15105    pub climb_rate: i8,
15106    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15107    pub gps_nsat: u8,
15108    #[doc = "GPS Fix type."]
15109    pub gps_fix_type: GpsFixType,
15110    #[doc = "Remaining battery (percentage)"]
15111    pub battery_remaining: u8,
15112    #[doc = "Autopilot temperature (degrees C)"]
15113    pub temperature: i8,
15114    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15115    pub temperature_air: i8,
15116    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15117    pub failsafe: u8,
15118    #[doc = "current waypoint number"]
15119    pub wp_num: u8,
15120}
15121impl HIGH_LATENCY_DATA {
15122    pub const ENCODED_LEN: usize = 40usize;
15123    pub const DEFAULT: Self = Self {
15124        custom_mode: 0_u32,
15125        latitude: 0_i32,
15126        longitude: 0_i32,
15127        roll: 0_i16,
15128        pitch: 0_i16,
15129        heading: 0_u16,
15130        heading_sp: 0_i16,
15131        altitude_amsl: 0_i16,
15132        altitude_sp: 0_i16,
15133        wp_distance: 0_u16,
15134        base_mode: MavModeFlag::DEFAULT,
15135        landed_state: MavLandedState::DEFAULT,
15136        throttle: 0_i8,
15137        airspeed: 0_u8,
15138        airspeed_sp: 0_u8,
15139        groundspeed: 0_u8,
15140        climb_rate: 0_i8,
15141        gps_nsat: 0_u8,
15142        gps_fix_type: GpsFixType::DEFAULT,
15143        battery_remaining: 0_u8,
15144        temperature: 0_i8,
15145        temperature_air: 0_i8,
15146        failsafe: 0_u8,
15147        wp_num: 0_u8,
15148    };
15149    #[cfg(feature = "arbitrary")]
15150    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15151        use arbitrary::{Arbitrary, Unstructured};
15152        let mut buf = [0u8; 1024];
15153        rng.fill_bytes(&mut buf);
15154        let mut unstructured = Unstructured::new(&buf);
15155        Self::arbitrary(&mut unstructured).unwrap_or_default()
15156    }
15157}
15158impl Default for HIGH_LATENCY_DATA {
15159    fn default() -> Self {
15160        Self::DEFAULT.clone()
15161    }
15162}
15163impl MessageData for HIGH_LATENCY_DATA {
15164    type Message = MavMessage;
15165    const ID: u32 = 234u32;
15166    const NAME: &'static str = "HIGH_LATENCY";
15167    const EXTRA_CRC: u8 = 150u8;
15168    const ENCODED_LEN: usize = 40usize;
15169    fn deser(
15170        _version: MavlinkVersion,
15171        __input: &[u8],
15172    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15173        let avail_len = __input.len();
15174        let mut payload_buf = [0; Self::ENCODED_LEN];
15175        let mut buf = if avail_len < Self::ENCODED_LEN {
15176            payload_buf[0..avail_len].copy_from_slice(__input);
15177            Bytes::new(&payload_buf)
15178        } else {
15179            Bytes::new(__input)
15180        };
15181        let mut __struct = Self::default();
15182        __struct.custom_mode = buf.get_u32_le();
15183        __struct.latitude = buf.get_i32_le();
15184        __struct.longitude = buf.get_i32_le();
15185        __struct.roll = buf.get_i16_le();
15186        __struct.pitch = buf.get_i16_le();
15187        __struct.heading = buf.get_u16_le();
15188        __struct.heading_sp = buf.get_i16_le();
15189        __struct.altitude_amsl = buf.get_i16_le();
15190        __struct.altitude_sp = buf.get_i16_le();
15191        __struct.wp_distance = buf.get_u16_le();
15192        let tmp = buf.get_u8();
15193        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15194            ::mavlink_core::error::ParserError::InvalidFlag {
15195                flag_type: "MavModeFlag",
15196                value: tmp as u32,
15197            },
15198        )?;
15199        let tmp = buf.get_u8();
15200        __struct.landed_state =
15201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15202                enum_type: "MavLandedState",
15203                value: tmp as u32,
15204            })?;
15205        __struct.throttle = buf.get_i8();
15206        __struct.airspeed = buf.get_u8();
15207        __struct.airspeed_sp = buf.get_u8();
15208        __struct.groundspeed = buf.get_u8();
15209        __struct.climb_rate = buf.get_i8();
15210        __struct.gps_nsat = buf.get_u8();
15211        let tmp = buf.get_u8();
15212        __struct.gps_fix_type =
15213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15214                enum_type: "GpsFixType",
15215                value: tmp as u32,
15216            })?;
15217        __struct.battery_remaining = buf.get_u8();
15218        __struct.temperature = buf.get_i8();
15219        __struct.temperature_air = buf.get_i8();
15220        __struct.failsafe = buf.get_u8();
15221        __struct.wp_num = buf.get_u8();
15222        Ok(__struct)
15223    }
15224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15225        let mut __tmp = BytesMut::new(bytes);
15226        #[allow(clippy::absurd_extreme_comparisons)]
15227        #[allow(unused_comparisons)]
15228        if __tmp.remaining() < Self::ENCODED_LEN {
15229            panic!(
15230                "buffer is too small (need {} bytes, but got {})",
15231                Self::ENCODED_LEN,
15232                __tmp.remaining(),
15233            )
15234        }
15235        __tmp.put_u32_le(self.custom_mode);
15236        __tmp.put_i32_le(self.latitude);
15237        __tmp.put_i32_le(self.longitude);
15238        __tmp.put_i16_le(self.roll);
15239        __tmp.put_i16_le(self.pitch);
15240        __tmp.put_u16_le(self.heading);
15241        __tmp.put_i16_le(self.heading_sp);
15242        __tmp.put_i16_le(self.altitude_amsl);
15243        __tmp.put_i16_le(self.altitude_sp);
15244        __tmp.put_u16_le(self.wp_distance);
15245        __tmp.put_u8(self.base_mode.bits());
15246        __tmp.put_u8(self.landed_state as u8);
15247        __tmp.put_i8(self.throttle);
15248        __tmp.put_u8(self.airspeed);
15249        __tmp.put_u8(self.airspeed_sp);
15250        __tmp.put_u8(self.groundspeed);
15251        __tmp.put_i8(self.climb_rate);
15252        __tmp.put_u8(self.gps_nsat);
15253        __tmp.put_u8(self.gps_fix_type as u8);
15254        __tmp.put_u8(self.battery_remaining);
15255        __tmp.put_i8(self.temperature);
15256        __tmp.put_i8(self.temperature_air);
15257        __tmp.put_u8(self.failsafe);
15258        __tmp.put_u8(self.wp_num);
15259        if matches!(version, MavlinkVersion::V2) {
15260            let len = __tmp.len();
15261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15262        } else {
15263            __tmp.len()
15264        }
15265    }
15266}
15267#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15268#[doc = ""]
15269#[doc = "ID: 235"]
15270#[derive(Debug, Clone, PartialEq)]
15271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15273#[cfg_attr(feature = "ts", derive(TS))]
15274#[cfg_attr(feature = "ts", ts(export))]
15275pub struct HIGH_LATENCY2_DATA {
15276    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15277    pub timestamp: u32,
15278    #[doc = "Latitude"]
15279    pub latitude: i32,
15280    #[doc = "Longitude"]
15281    pub longitude: i32,
15282    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15283    pub custom_mode: u16,
15284    #[doc = "Altitude above mean sea level"]
15285    pub altitude: i16,
15286    #[doc = "Altitude setpoint"]
15287    pub target_altitude: i16,
15288    #[doc = "Distance to target waypoint or position"]
15289    pub target_distance: u16,
15290    #[doc = "Current waypoint number"]
15291    pub wp_num: u16,
15292    #[doc = "Bitmap of failure flags."]
15293    pub failure_flags: HlFailureFlag,
15294    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15295    pub mavtype: MavType,
15296    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15297    pub autopilot: MavAutopilot,
15298    #[doc = "Heading"]
15299    pub heading: u8,
15300    #[doc = "Heading setpoint"]
15301    pub target_heading: u8,
15302    #[doc = "Throttle"]
15303    pub throttle: u8,
15304    #[doc = "Airspeed"]
15305    pub airspeed: u8,
15306    #[doc = "Airspeed setpoint"]
15307    pub airspeed_sp: u8,
15308    #[doc = "Groundspeed"]
15309    pub groundspeed: u8,
15310    #[doc = "Windspeed"]
15311    pub windspeed: u8,
15312    #[doc = "Wind heading"]
15313    pub wind_heading: u8,
15314    #[doc = "Maximum error horizontal position since last message"]
15315    pub eph: u8,
15316    #[doc = "Maximum error vertical position since last message"]
15317    pub epv: u8,
15318    #[doc = "Air temperature"]
15319    pub temperature_air: i8,
15320    #[doc = "Maximum climb rate magnitude since last message"]
15321    pub climb_rate: i8,
15322    #[doc = "Battery level (-1 if field not provided)."]
15323    pub battery: i8,
15324    #[doc = "Field for custom payload."]
15325    pub custom0: i8,
15326    #[doc = "Field for custom payload."]
15327    pub custom1: i8,
15328    #[doc = "Field for custom payload."]
15329    pub custom2: i8,
15330}
15331impl HIGH_LATENCY2_DATA {
15332    pub const ENCODED_LEN: usize = 42usize;
15333    pub const DEFAULT: Self = Self {
15334        timestamp: 0_u32,
15335        latitude: 0_i32,
15336        longitude: 0_i32,
15337        custom_mode: 0_u16,
15338        altitude: 0_i16,
15339        target_altitude: 0_i16,
15340        target_distance: 0_u16,
15341        wp_num: 0_u16,
15342        failure_flags: HlFailureFlag::DEFAULT,
15343        mavtype: MavType::DEFAULT,
15344        autopilot: MavAutopilot::DEFAULT,
15345        heading: 0_u8,
15346        target_heading: 0_u8,
15347        throttle: 0_u8,
15348        airspeed: 0_u8,
15349        airspeed_sp: 0_u8,
15350        groundspeed: 0_u8,
15351        windspeed: 0_u8,
15352        wind_heading: 0_u8,
15353        eph: 0_u8,
15354        epv: 0_u8,
15355        temperature_air: 0_i8,
15356        climb_rate: 0_i8,
15357        battery: 0_i8,
15358        custom0: 0_i8,
15359        custom1: 0_i8,
15360        custom2: 0_i8,
15361    };
15362    #[cfg(feature = "arbitrary")]
15363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15364        use arbitrary::{Arbitrary, Unstructured};
15365        let mut buf = [0u8; 1024];
15366        rng.fill_bytes(&mut buf);
15367        let mut unstructured = Unstructured::new(&buf);
15368        Self::arbitrary(&mut unstructured).unwrap_or_default()
15369    }
15370}
15371impl Default for HIGH_LATENCY2_DATA {
15372    fn default() -> Self {
15373        Self::DEFAULT.clone()
15374    }
15375}
15376impl MessageData for HIGH_LATENCY2_DATA {
15377    type Message = MavMessage;
15378    const ID: u32 = 235u32;
15379    const NAME: &'static str = "HIGH_LATENCY2";
15380    const EXTRA_CRC: u8 = 179u8;
15381    const ENCODED_LEN: usize = 42usize;
15382    fn deser(
15383        _version: MavlinkVersion,
15384        __input: &[u8],
15385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15386        let avail_len = __input.len();
15387        let mut payload_buf = [0; Self::ENCODED_LEN];
15388        let mut buf = if avail_len < Self::ENCODED_LEN {
15389            payload_buf[0..avail_len].copy_from_slice(__input);
15390            Bytes::new(&payload_buf)
15391        } else {
15392            Bytes::new(__input)
15393        };
15394        let mut __struct = Self::default();
15395        __struct.timestamp = buf.get_u32_le();
15396        __struct.latitude = buf.get_i32_le();
15397        __struct.longitude = buf.get_i32_le();
15398        __struct.custom_mode = buf.get_u16_le();
15399        __struct.altitude = buf.get_i16_le();
15400        __struct.target_altitude = buf.get_i16_le();
15401        __struct.target_distance = buf.get_u16_le();
15402        __struct.wp_num = buf.get_u16_le();
15403        let tmp = buf.get_u16_le();
15404        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15405            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15406                flag_type: "HlFailureFlag",
15407                value: tmp as u32,
15408            })?;
15409        let tmp = buf.get_u8();
15410        __struct.mavtype =
15411            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15412                enum_type: "MavType",
15413                value: tmp as u32,
15414            })?;
15415        let tmp = buf.get_u8();
15416        __struct.autopilot =
15417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15418                enum_type: "MavAutopilot",
15419                value: tmp as u32,
15420            })?;
15421        __struct.heading = buf.get_u8();
15422        __struct.target_heading = buf.get_u8();
15423        __struct.throttle = buf.get_u8();
15424        __struct.airspeed = buf.get_u8();
15425        __struct.airspeed_sp = buf.get_u8();
15426        __struct.groundspeed = buf.get_u8();
15427        __struct.windspeed = buf.get_u8();
15428        __struct.wind_heading = buf.get_u8();
15429        __struct.eph = buf.get_u8();
15430        __struct.epv = buf.get_u8();
15431        __struct.temperature_air = buf.get_i8();
15432        __struct.climb_rate = buf.get_i8();
15433        __struct.battery = buf.get_i8();
15434        __struct.custom0 = buf.get_i8();
15435        __struct.custom1 = buf.get_i8();
15436        __struct.custom2 = buf.get_i8();
15437        Ok(__struct)
15438    }
15439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15440        let mut __tmp = BytesMut::new(bytes);
15441        #[allow(clippy::absurd_extreme_comparisons)]
15442        #[allow(unused_comparisons)]
15443        if __tmp.remaining() < Self::ENCODED_LEN {
15444            panic!(
15445                "buffer is too small (need {} bytes, but got {})",
15446                Self::ENCODED_LEN,
15447                __tmp.remaining(),
15448            )
15449        }
15450        __tmp.put_u32_le(self.timestamp);
15451        __tmp.put_i32_le(self.latitude);
15452        __tmp.put_i32_le(self.longitude);
15453        __tmp.put_u16_le(self.custom_mode);
15454        __tmp.put_i16_le(self.altitude);
15455        __tmp.put_i16_le(self.target_altitude);
15456        __tmp.put_u16_le(self.target_distance);
15457        __tmp.put_u16_le(self.wp_num);
15458        __tmp.put_u16_le(self.failure_flags.bits());
15459        __tmp.put_u8(self.mavtype as u8);
15460        __tmp.put_u8(self.autopilot as u8);
15461        __tmp.put_u8(self.heading);
15462        __tmp.put_u8(self.target_heading);
15463        __tmp.put_u8(self.throttle);
15464        __tmp.put_u8(self.airspeed);
15465        __tmp.put_u8(self.airspeed_sp);
15466        __tmp.put_u8(self.groundspeed);
15467        __tmp.put_u8(self.windspeed);
15468        __tmp.put_u8(self.wind_heading);
15469        __tmp.put_u8(self.eph);
15470        __tmp.put_u8(self.epv);
15471        __tmp.put_i8(self.temperature_air);
15472        __tmp.put_i8(self.climb_rate);
15473        __tmp.put_i8(self.battery);
15474        __tmp.put_i8(self.custom0);
15475        __tmp.put_i8(self.custom1);
15476        __tmp.put_i8(self.custom2);
15477        if matches!(version, MavlinkVersion::V2) {
15478            let len = __tmp.len();
15479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15480        } else {
15481            __tmp.len()
15482        }
15483    }
15484}
15485#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15486#[doc = ""]
15487#[doc = "ID: 93"]
15488#[derive(Debug, Clone, PartialEq)]
15489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15491#[cfg_attr(feature = "ts", derive(TS))]
15492#[cfg_attr(feature = "ts", ts(export))]
15493pub struct HIL_ACTUATOR_CONTROLS_DATA {
15494    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15495    pub time_usec: u64,
15496    #[doc = "Flags bitmask."]
15497    pub flags: HilActuatorControlsFlags,
15498    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15501    pub controls: [f32; 16],
15502    #[doc = "System mode. Includes arming state."]
15503    pub mode: MavModeFlag,
15504}
15505impl HIL_ACTUATOR_CONTROLS_DATA {
15506    pub const ENCODED_LEN: usize = 81usize;
15507    pub const DEFAULT: Self = Self {
15508        time_usec: 0_u64,
15509        flags: HilActuatorControlsFlags::DEFAULT,
15510        controls: [0.0_f32; 16usize],
15511        mode: MavModeFlag::DEFAULT,
15512    };
15513    #[cfg(feature = "arbitrary")]
15514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15515        use arbitrary::{Arbitrary, Unstructured};
15516        let mut buf = [0u8; 1024];
15517        rng.fill_bytes(&mut buf);
15518        let mut unstructured = Unstructured::new(&buf);
15519        Self::arbitrary(&mut unstructured).unwrap_or_default()
15520    }
15521}
15522impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15523    fn default() -> Self {
15524        Self::DEFAULT.clone()
15525    }
15526}
15527impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15528    type Message = MavMessage;
15529    const ID: u32 = 93u32;
15530    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15531    const EXTRA_CRC: u8 = 47u8;
15532    const ENCODED_LEN: usize = 81usize;
15533    fn deser(
15534        _version: MavlinkVersion,
15535        __input: &[u8],
15536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15537        let avail_len = __input.len();
15538        let mut payload_buf = [0; Self::ENCODED_LEN];
15539        let mut buf = if avail_len < Self::ENCODED_LEN {
15540            payload_buf[0..avail_len].copy_from_slice(__input);
15541            Bytes::new(&payload_buf)
15542        } else {
15543            Bytes::new(__input)
15544        };
15545        let mut __struct = Self::default();
15546        __struct.time_usec = buf.get_u64_le();
15547        let tmp = buf.get_u64_le();
15548        __struct.flags =
15549            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15550                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15551                    flag_type: "HilActuatorControlsFlags",
15552                    value: tmp as u32,
15553                })?;
15554        for v in &mut __struct.controls {
15555            let val = buf.get_f32_le();
15556            *v = val;
15557        }
15558        let tmp = buf.get_u8();
15559        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15560            ::mavlink_core::error::ParserError::InvalidFlag {
15561                flag_type: "MavModeFlag",
15562                value: tmp as u32,
15563            },
15564        )?;
15565        Ok(__struct)
15566    }
15567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15568        let mut __tmp = BytesMut::new(bytes);
15569        #[allow(clippy::absurd_extreme_comparisons)]
15570        #[allow(unused_comparisons)]
15571        if __tmp.remaining() < Self::ENCODED_LEN {
15572            panic!(
15573                "buffer is too small (need {} bytes, but got {})",
15574                Self::ENCODED_LEN,
15575                __tmp.remaining(),
15576            )
15577        }
15578        __tmp.put_u64_le(self.time_usec);
15579        __tmp.put_u64_le(self.flags.bits());
15580        for val in &self.controls {
15581            __tmp.put_f32_le(*val);
15582        }
15583        __tmp.put_u8(self.mode.bits());
15584        if matches!(version, MavlinkVersion::V2) {
15585            let len = __tmp.len();
15586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15587        } else {
15588            __tmp.len()
15589        }
15590    }
15591}
15592#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15593#[doc = ""]
15594#[doc = "ID: 91"]
15595#[derive(Debug, Clone, PartialEq)]
15596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15598#[cfg_attr(feature = "ts", derive(TS))]
15599#[cfg_attr(feature = "ts", ts(export))]
15600pub struct HIL_CONTROLS_DATA {
15601    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15602    pub time_usec: u64,
15603    #[doc = "Control output -1 .. 1"]
15604    pub roll_ailerons: f32,
15605    #[doc = "Control output -1 .. 1"]
15606    pub pitch_elevator: f32,
15607    #[doc = "Control output -1 .. 1"]
15608    pub yaw_rudder: f32,
15609    #[doc = "Throttle 0 .. 1"]
15610    pub throttle: f32,
15611    #[doc = "Aux 1, -1 .. 1"]
15612    pub aux1: f32,
15613    #[doc = "Aux 2, -1 .. 1"]
15614    pub aux2: f32,
15615    #[doc = "Aux 3, -1 .. 1"]
15616    pub aux3: f32,
15617    #[doc = "Aux 4, -1 .. 1"]
15618    pub aux4: f32,
15619    #[doc = "System mode."]
15620    pub mode: MavMode,
15621    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15622    pub nav_mode: u8,
15623}
15624impl HIL_CONTROLS_DATA {
15625    pub const ENCODED_LEN: usize = 42usize;
15626    pub const DEFAULT: Self = Self {
15627        time_usec: 0_u64,
15628        roll_ailerons: 0.0_f32,
15629        pitch_elevator: 0.0_f32,
15630        yaw_rudder: 0.0_f32,
15631        throttle: 0.0_f32,
15632        aux1: 0.0_f32,
15633        aux2: 0.0_f32,
15634        aux3: 0.0_f32,
15635        aux4: 0.0_f32,
15636        mode: MavMode::DEFAULT,
15637        nav_mode: 0_u8,
15638    };
15639    #[cfg(feature = "arbitrary")]
15640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15641        use arbitrary::{Arbitrary, Unstructured};
15642        let mut buf = [0u8; 1024];
15643        rng.fill_bytes(&mut buf);
15644        let mut unstructured = Unstructured::new(&buf);
15645        Self::arbitrary(&mut unstructured).unwrap_or_default()
15646    }
15647}
15648impl Default for HIL_CONTROLS_DATA {
15649    fn default() -> Self {
15650        Self::DEFAULT.clone()
15651    }
15652}
15653impl MessageData for HIL_CONTROLS_DATA {
15654    type Message = MavMessage;
15655    const ID: u32 = 91u32;
15656    const NAME: &'static str = "HIL_CONTROLS";
15657    const EXTRA_CRC: u8 = 63u8;
15658    const ENCODED_LEN: usize = 42usize;
15659    fn deser(
15660        _version: MavlinkVersion,
15661        __input: &[u8],
15662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15663        let avail_len = __input.len();
15664        let mut payload_buf = [0; Self::ENCODED_LEN];
15665        let mut buf = if avail_len < Self::ENCODED_LEN {
15666            payload_buf[0..avail_len].copy_from_slice(__input);
15667            Bytes::new(&payload_buf)
15668        } else {
15669            Bytes::new(__input)
15670        };
15671        let mut __struct = Self::default();
15672        __struct.time_usec = buf.get_u64_le();
15673        __struct.roll_ailerons = buf.get_f32_le();
15674        __struct.pitch_elevator = buf.get_f32_le();
15675        __struct.yaw_rudder = buf.get_f32_le();
15676        __struct.throttle = buf.get_f32_le();
15677        __struct.aux1 = buf.get_f32_le();
15678        __struct.aux2 = buf.get_f32_le();
15679        __struct.aux3 = buf.get_f32_le();
15680        __struct.aux4 = buf.get_f32_le();
15681        let tmp = buf.get_u8();
15682        __struct.mode =
15683            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15684                enum_type: "MavMode",
15685                value: tmp as u32,
15686            })?;
15687        __struct.nav_mode = buf.get_u8();
15688        Ok(__struct)
15689    }
15690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15691        let mut __tmp = BytesMut::new(bytes);
15692        #[allow(clippy::absurd_extreme_comparisons)]
15693        #[allow(unused_comparisons)]
15694        if __tmp.remaining() < Self::ENCODED_LEN {
15695            panic!(
15696                "buffer is too small (need {} bytes, but got {})",
15697                Self::ENCODED_LEN,
15698                __tmp.remaining(),
15699            )
15700        }
15701        __tmp.put_u64_le(self.time_usec);
15702        __tmp.put_f32_le(self.roll_ailerons);
15703        __tmp.put_f32_le(self.pitch_elevator);
15704        __tmp.put_f32_le(self.yaw_rudder);
15705        __tmp.put_f32_le(self.throttle);
15706        __tmp.put_f32_le(self.aux1);
15707        __tmp.put_f32_le(self.aux2);
15708        __tmp.put_f32_le(self.aux3);
15709        __tmp.put_f32_le(self.aux4);
15710        __tmp.put_u8(self.mode as u8);
15711        __tmp.put_u8(self.nav_mode);
15712        if matches!(version, MavlinkVersion::V2) {
15713            let len = __tmp.len();
15714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15715        } else {
15716            __tmp.len()
15717        }
15718    }
15719}
15720#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15721#[doc = ""]
15722#[doc = "ID: 113"]
15723#[derive(Debug, Clone, PartialEq)]
15724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15726#[cfg_attr(feature = "ts", derive(TS))]
15727#[cfg_attr(feature = "ts", ts(export))]
15728pub struct HIL_GPS_DATA {
15729    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15730    pub time_usec: u64,
15731    #[doc = "Latitude (WGS84)"]
15732    pub lat: i32,
15733    #[doc = "Longitude (WGS84)"]
15734    pub lon: i32,
15735    #[doc = "Altitude (MSL). Positive for up."]
15736    pub alt: i32,
15737    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15738    pub eph: u16,
15739    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15740    pub epv: u16,
15741    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15742    pub vel: u16,
15743    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15744    pub vn: i16,
15745    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15746    pub ve: i16,
15747    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15748    pub vd: i16,
15749    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15750    pub cog: u16,
15751    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15752    pub fix_type: u8,
15753    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15754    pub satellites_visible: u8,
15755    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15756    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15757    pub id: u8,
15758    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15760    pub yaw: u16,
15761}
15762impl HIL_GPS_DATA {
15763    pub const ENCODED_LEN: usize = 39usize;
15764    pub const DEFAULT: Self = Self {
15765        time_usec: 0_u64,
15766        lat: 0_i32,
15767        lon: 0_i32,
15768        alt: 0_i32,
15769        eph: 0_u16,
15770        epv: 0_u16,
15771        vel: 0_u16,
15772        vn: 0_i16,
15773        ve: 0_i16,
15774        vd: 0_i16,
15775        cog: 0_u16,
15776        fix_type: 0_u8,
15777        satellites_visible: 0_u8,
15778        id: 0_u8,
15779        yaw: 0_u16,
15780    };
15781    #[cfg(feature = "arbitrary")]
15782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15783        use arbitrary::{Arbitrary, Unstructured};
15784        let mut buf = [0u8; 1024];
15785        rng.fill_bytes(&mut buf);
15786        let mut unstructured = Unstructured::new(&buf);
15787        Self::arbitrary(&mut unstructured).unwrap_or_default()
15788    }
15789}
15790impl Default for HIL_GPS_DATA {
15791    fn default() -> Self {
15792        Self::DEFAULT.clone()
15793    }
15794}
15795impl MessageData for HIL_GPS_DATA {
15796    type Message = MavMessage;
15797    const ID: u32 = 113u32;
15798    const NAME: &'static str = "HIL_GPS";
15799    const EXTRA_CRC: u8 = 124u8;
15800    const ENCODED_LEN: usize = 39usize;
15801    fn deser(
15802        _version: MavlinkVersion,
15803        __input: &[u8],
15804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15805        let avail_len = __input.len();
15806        let mut payload_buf = [0; Self::ENCODED_LEN];
15807        let mut buf = if avail_len < Self::ENCODED_LEN {
15808            payload_buf[0..avail_len].copy_from_slice(__input);
15809            Bytes::new(&payload_buf)
15810        } else {
15811            Bytes::new(__input)
15812        };
15813        let mut __struct = Self::default();
15814        __struct.time_usec = buf.get_u64_le();
15815        __struct.lat = buf.get_i32_le();
15816        __struct.lon = buf.get_i32_le();
15817        __struct.alt = buf.get_i32_le();
15818        __struct.eph = buf.get_u16_le();
15819        __struct.epv = buf.get_u16_le();
15820        __struct.vel = buf.get_u16_le();
15821        __struct.vn = buf.get_i16_le();
15822        __struct.ve = buf.get_i16_le();
15823        __struct.vd = buf.get_i16_le();
15824        __struct.cog = buf.get_u16_le();
15825        __struct.fix_type = buf.get_u8();
15826        __struct.satellites_visible = buf.get_u8();
15827        __struct.id = buf.get_u8();
15828        __struct.yaw = buf.get_u16_le();
15829        Ok(__struct)
15830    }
15831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15832        let mut __tmp = BytesMut::new(bytes);
15833        #[allow(clippy::absurd_extreme_comparisons)]
15834        #[allow(unused_comparisons)]
15835        if __tmp.remaining() < Self::ENCODED_LEN {
15836            panic!(
15837                "buffer is too small (need {} bytes, but got {})",
15838                Self::ENCODED_LEN,
15839                __tmp.remaining(),
15840            )
15841        }
15842        __tmp.put_u64_le(self.time_usec);
15843        __tmp.put_i32_le(self.lat);
15844        __tmp.put_i32_le(self.lon);
15845        __tmp.put_i32_le(self.alt);
15846        __tmp.put_u16_le(self.eph);
15847        __tmp.put_u16_le(self.epv);
15848        __tmp.put_u16_le(self.vel);
15849        __tmp.put_i16_le(self.vn);
15850        __tmp.put_i16_le(self.ve);
15851        __tmp.put_i16_le(self.vd);
15852        __tmp.put_u16_le(self.cog);
15853        __tmp.put_u8(self.fix_type);
15854        __tmp.put_u8(self.satellites_visible);
15855        if matches!(version, MavlinkVersion::V2) {
15856            __tmp.put_u8(self.id);
15857            __tmp.put_u16_le(self.yaw);
15858            let len = __tmp.len();
15859            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15860        } else {
15861            __tmp.len()
15862        }
15863    }
15864}
15865#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15866#[doc = ""]
15867#[doc = "ID: 114"]
15868#[derive(Debug, Clone, PartialEq)]
15869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15871#[cfg_attr(feature = "ts", derive(TS))]
15872#[cfg_attr(feature = "ts", ts(export))]
15873pub struct HIL_OPTICAL_FLOW_DATA {
15874    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15875    pub time_usec: u64,
15876    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15877    pub integration_time_us: u32,
15878    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15879    pub integrated_x: f32,
15880    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15881    pub integrated_y: f32,
15882    #[doc = "RH rotation around X axis"]
15883    pub integrated_xgyro: f32,
15884    #[doc = "RH rotation around Y axis"]
15885    pub integrated_ygyro: f32,
15886    #[doc = "RH rotation around Z axis"]
15887    pub integrated_zgyro: f32,
15888    #[doc = "Time since the distance was sampled."]
15889    pub time_delta_distance_us: u32,
15890    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15891    pub distance: f32,
15892    #[doc = "Temperature"]
15893    pub temperature: i16,
15894    #[doc = "Sensor ID"]
15895    pub sensor_id: u8,
15896    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15897    pub quality: u8,
15898}
15899impl HIL_OPTICAL_FLOW_DATA {
15900    pub const ENCODED_LEN: usize = 44usize;
15901    pub const DEFAULT: Self = Self {
15902        time_usec: 0_u64,
15903        integration_time_us: 0_u32,
15904        integrated_x: 0.0_f32,
15905        integrated_y: 0.0_f32,
15906        integrated_xgyro: 0.0_f32,
15907        integrated_ygyro: 0.0_f32,
15908        integrated_zgyro: 0.0_f32,
15909        time_delta_distance_us: 0_u32,
15910        distance: 0.0_f32,
15911        temperature: 0_i16,
15912        sensor_id: 0_u8,
15913        quality: 0_u8,
15914    };
15915    #[cfg(feature = "arbitrary")]
15916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15917        use arbitrary::{Arbitrary, Unstructured};
15918        let mut buf = [0u8; 1024];
15919        rng.fill_bytes(&mut buf);
15920        let mut unstructured = Unstructured::new(&buf);
15921        Self::arbitrary(&mut unstructured).unwrap_or_default()
15922    }
15923}
15924impl Default for HIL_OPTICAL_FLOW_DATA {
15925    fn default() -> Self {
15926        Self::DEFAULT.clone()
15927    }
15928}
15929impl MessageData for HIL_OPTICAL_FLOW_DATA {
15930    type Message = MavMessage;
15931    const ID: u32 = 114u32;
15932    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15933    const EXTRA_CRC: u8 = 237u8;
15934    const ENCODED_LEN: usize = 44usize;
15935    fn deser(
15936        _version: MavlinkVersion,
15937        __input: &[u8],
15938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15939        let avail_len = __input.len();
15940        let mut payload_buf = [0; Self::ENCODED_LEN];
15941        let mut buf = if avail_len < Self::ENCODED_LEN {
15942            payload_buf[0..avail_len].copy_from_slice(__input);
15943            Bytes::new(&payload_buf)
15944        } else {
15945            Bytes::new(__input)
15946        };
15947        let mut __struct = Self::default();
15948        __struct.time_usec = buf.get_u64_le();
15949        __struct.integration_time_us = buf.get_u32_le();
15950        __struct.integrated_x = buf.get_f32_le();
15951        __struct.integrated_y = buf.get_f32_le();
15952        __struct.integrated_xgyro = buf.get_f32_le();
15953        __struct.integrated_ygyro = buf.get_f32_le();
15954        __struct.integrated_zgyro = buf.get_f32_le();
15955        __struct.time_delta_distance_us = buf.get_u32_le();
15956        __struct.distance = buf.get_f32_le();
15957        __struct.temperature = buf.get_i16_le();
15958        __struct.sensor_id = buf.get_u8();
15959        __struct.quality = buf.get_u8();
15960        Ok(__struct)
15961    }
15962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15963        let mut __tmp = BytesMut::new(bytes);
15964        #[allow(clippy::absurd_extreme_comparisons)]
15965        #[allow(unused_comparisons)]
15966        if __tmp.remaining() < Self::ENCODED_LEN {
15967            panic!(
15968                "buffer is too small (need {} bytes, but got {})",
15969                Self::ENCODED_LEN,
15970                __tmp.remaining(),
15971            )
15972        }
15973        __tmp.put_u64_le(self.time_usec);
15974        __tmp.put_u32_le(self.integration_time_us);
15975        __tmp.put_f32_le(self.integrated_x);
15976        __tmp.put_f32_le(self.integrated_y);
15977        __tmp.put_f32_le(self.integrated_xgyro);
15978        __tmp.put_f32_le(self.integrated_ygyro);
15979        __tmp.put_f32_le(self.integrated_zgyro);
15980        __tmp.put_u32_le(self.time_delta_distance_us);
15981        __tmp.put_f32_le(self.distance);
15982        __tmp.put_i16_le(self.temperature);
15983        __tmp.put_u8(self.sensor_id);
15984        __tmp.put_u8(self.quality);
15985        if matches!(version, MavlinkVersion::V2) {
15986            let len = __tmp.len();
15987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15988        } else {
15989            __tmp.len()
15990        }
15991    }
15992}
15993#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15994#[doc = ""]
15995#[doc = "ID: 92"]
15996#[derive(Debug, Clone, PartialEq)]
15997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15999#[cfg_attr(feature = "ts", derive(TS))]
16000#[cfg_attr(feature = "ts", ts(export))]
16001pub struct HIL_RC_INPUTS_RAW_DATA {
16002    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16003    pub time_usec: u64,
16004    #[doc = "RC channel 1 value"]
16005    pub chan1_raw: u16,
16006    #[doc = "RC channel 2 value"]
16007    pub chan2_raw: u16,
16008    #[doc = "RC channel 3 value"]
16009    pub chan3_raw: u16,
16010    #[doc = "RC channel 4 value"]
16011    pub chan4_raw: u16,
16012    #[doc = "RC channel 5 value"]
16013    pub chan5_raw: u16,
16014    #[doc = "RC channel 6 value"]
16015    pub chan6_raw: u16,
16016    #[doc = "RC channel 7 value"]
16017    pub chan7_raw: u16,
16018    #[doc = "RC channel 8 value"]
16019    pub chan8_raw: u16,
16020    #[doc = "RC channel 9 value"]
16021    pub chan9_raw: u16,
16022    #[doc = "RC channel 10 value"]
16023    pub chan10_raw: u16,
16024    #[doc = "RC channel 11 value"]
16025    pub chan11_raw: u16,
16026    #[doc = "RC channel 12 value"]
16027    pub chan12_raw: u16,
16028    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16029    pub rssi: u8,
16030}
16031impl HIL_RC_INPUTS_RAW_DATA {
16032    pub const ENCODED_LEN: usize = 33usize;
16033    pub const DEFAULT: Self = Self {
16034        time_usec: 0_u64,
16035        chan1_raw: 0_u16,
16036        chan2_raw: 0_u16,
16037        chan3_raw: 0_u16,
16038        chan4_raw: 0_u16,
16039        chan5_raw: 0_u16,
16040        chan6_raw: 0_u16,
16041        chan7_raw: 0_u16,
16042        chan8_raw: 0_u16,
16043        chan9_raw: 0_u16,
16044        chan10_raw: 0_u16,
16045        chan11_raw: 0_u16,
16046        chan12_raw: 0_u16,
16047        rssi: 0_u8,
16048    };
16049    #[cfg(feature = "arbitrary")]
16050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16051        use arbitrary::{Arbitrary, Unstructured};
16052        let mut buf = [0u8; 1024];
16053        rng.fill_bytes(&mut buf);
16054        let mut unstructured = Unstructured::new(&buf);
16055        Self::arbitrary(&mut unstructured).unwrap_or_default()
16056    }
16057}
16058impl Default for HIL_RC_INPUTS_RAW_DATA {
16059    fn default() -> Self {
16060        Self::DEFAULT.clone()
16061    }
16062}
16063impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16064    type Message = MavMessage;
16065    const ID: u32 = 92u32;
16066    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16067    const EXTRA_CRC: u8 = 54u8;
16068    const ENCODED_LEN: usize = 33usize;
16069    fn deser(
16070        _version: MavlinkVersion,
16071        __input: &[u8],
16072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16073        let avail_len = __input.len();
16074        let mut payload_buf = [0; Self::ENCODED_LEN];
16075        let mut buf = if avail_len < Self::ENCODED_LEN {
16076            payload_buf[0..avail_len].copy_from_slice(__input);
16077            Bytes::new(&payload_buf)
16078        } else {
16079            Bytes::new(__input)
16080        };
16081        let mut __struct = Self::default();
16082        __struct.time_usec = buf.get_u64_le();
16083        __struct.chan1_raw = buf.get_u16_le();
16084        __struct.chan2_raw = buf.get_u16_le();
16085        __struct.chan3_raw = buf.get_u16_le();
16086        __struct.chan4_raw = buf.get_u16_le();
16087        __struct.chan5_raw = buf.get_u16_le();
16088        __struct.chan6_raw = buf.get_u16_le();
16089        __struct.chan7_raw = buf.get_u16_le();
16090        __struct.chan8_raw = buf.get_u16_le();
16091        __struct.chan9_raw = buf.get_u16_le();
16092        __struct.chan10_raw = buf.get_u16_le();
16093        __struct.chan11_raw = buf.get_u16_le();
16094        __struct.chan12_raw = buf.get_u16_le();
16095        __struct.rssi = buf.get_u8();
16096        Ok(__struct)
16097    }
16098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16099        let mut __tmp = BytesMut::new(bytes);
16100        #[allow(clippy::absurd_extreme_comparisons)]
16101        #[allow(unused_comparisons)]
16102        if __tmp.remaining() < Self::ENCODED_LEN {
16103            panic!(
16104                "buffer is too small (need {} bytes, but got {})",
16105                Self::ENCODED_LEN,
16106                __tmp.remaining(),
16107            )
16108        }
16109        __tmp.put_u64_le(self.time_usec);
16110        __tmp.put_u16_le(self.chan1_raw);
16111        __tmp.put_u16_le(self.chan2_raw);
16112        __tmp.put_u16_le(self.chan3_raw);
16113        __tmp.put_u16_le(self.chan4_raw);
16114        __tmp.put_u16_le(self.chan5_raw);
16115        __tmp.put_u16_le(self.chan6_raw);
16116        __tmp.put_u16_le(self.chan7_raw);
16117        __tmp.put_u16_le(self.chan8_raw);
16118        __tmp.put_u16_le(self.chan9_raw);
16119        __tmp.put_u16_le(self.chan10_raw);
16120        __tmp.put_u16_le(self.chan11_raw);
16121        __tmp.put_u16_le(self.chan12_raw);
16122        __tmp.put_u8(self.rssi);
16123        if matches!(version, MavlinkVersion::V2) {
16124            let len = __tmp.len();
16125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16126        } else {
16127            __tmp.len()
16128        }
16129    }
16130}
16131#[doc = "The IMU readings in SI units in NED body frame."]
16132#[doc = ""]
16133#[doc = "ID: 107"]
16134#[derive(Debug, Clone, PartialEq)]
16135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16137#[cfg_attr(feature = "ts", derive(TS))]
16138#[cfg_attr(feature = "ts", ts(export))]
16139pub struct HIL_SENSOR_DATA {
16140    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16141    pub time_usec: u64,
16142    #[doc = "X acceleration"]
16143    pub xacc: f32,
16144    #[doc = "Y acceleration"]
16145    pub yacc: f32,
16146    #[doc = "Z acceleration"]
16147    pub zacc: f32,
16148    #[doc = "Angular speed around X axis in body frame"]
16149    pub xgyro: f32,
16150    #[doc = "Angular speed around Y axis in body frame"]
16151    pub ygyro: f32,
16152    #[doc = "Angular speed around Z axis in body frame"]
16153    pub zgyro: f32,
16154    #[doc = "X Magnetic field"]
16155    pub xmag: f32,
16156    #[doc = "Y Magnetic field"]
16157    pub ymag: f32,
16158    #[doc = "Z Magnetic field"]
16159    pub zmag: f32,
16160    #[doc = "Absolute pressure"]
16161    pub abs_pressure: f32,
16162    #[doc = "Differential pressure (airspeed)"]
16163    pub diff_pressure: f32,
16164    #[doc = "Altitude calculated from pressure"]
16165    pub pressure_alt: f32,
16166    #[doc = "Temperature"]
16167    pub temperature: f32,
16168    #[doc = "Bitmap for fields that have updated since last message"]
16169    pub fields_updated: HilSensorUpdatedFlags,
16170    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16171    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16172    pub id: u8,
16173}
16174impl HIL_SENSOR_DATA {
16175    pub const ENCODED_LEN: usize = 65usize;
16176    pub const DEFAULT: Self = Self {
16177        time_usec: 0_u64,
16178        xacc: 0.0_f32,
16179        yacc: 0.0_f32,
16180        zacc: 0.0_f32,
16181        xgyro: 0.0_f32,
16182        ygyro: 0.0_f32,
16183        zgyro: 0.0_f32,
16184        xmag: 0.0_f32,
16185        ymag: 0.0_f32,
16186        zmag: 0.0_f32,
16187        abs_pressure: 0.0_f32,
16188        diff_pressure: 0.0_f32,
16189        pressure_alt: 0.0_f32,
16190        temperature: 0.0_f32,
16191        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16192        id: 0_u8,
16193    };
16194    #[cfg(feature = "arbitrary")]
16195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16196        use arbitrary::{Arbitrary, Unstructured};
16197        let mut buf = [0u8; 1024];
16198        rng.fill_bytes(&mut buf);
16199        let mut unstructured = Unstructured::new(&buf);
16200        Self::arbitrary(&mut unstructured).unwrap_or_default()
16201    }
16202}
16203impl Default for HIL_SENSOR_DATA {
16204    fn default() -> Self {
16205        Self::DEFAULT.clone()
16206    }
16207}
16208impl MessageData for HIL_SENSOR_DATA {
16209    type Message = MavMessage;
16210    const ID: u32 = 107u32;
16211    const NAME: &'static str = "HIL_SENSOR";
16212    const EXTRA_CRC: u8 = 108u8;
16213    const ENCODED_LEN: usize = 65usize;
16214    fn deser(
16215        _version: MavlinkVersion,
16216        __input: &[u8],
16217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16218        let avail_len = __input.len();
16219        let mut payload_buf = [0; Self::ENCODED_LEN];
16220        let mut buf = if avail_len < Self::ENCODED_LEN {
16221            payload_buf[0..avail_len].copy_from_slice(__input);
16222            Bytes::new(&payload_buf)
16223        } else {
16224            Bytes::new(__input)
16225        };
16226        let mut __struct = Self::default();
16227        __struct.time_usec = buf.get_u64_le();
16228        __struct.xacc = buf.get_f32_le();
16229        __struct.yacc = buf.get_f32_le();
16230        __struct.zacc = buf.get_f32_le();
16231        __struct.xgyro = buf.get_f32_le();
16232        __struct.ygyro = buf.get_f32_le();
16233        __struct.zgyro = buf.get_f32_le();
16234        __struct.xmag = buf.get_f32_le();
16235        __struct.ymag = buf.get_f32_le();
16236        __struct.zmag = buf.get_f32_le();
16237        __struct.abs_pressure = buf.get_f32_le();
16238        __struct.diff_pressure = buf.get_f32_le();
16239        __struct.pressure_alt = buf.get_f32_le();
16240        __struct.temperature = buf.get_f32_le();
16241        let tmp = buf.get_u32_le();
16242        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16243            tmp & HilSensorUpdatedFlags::all().bits(),
16244        )
16245        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16246            flag_type: "HilSensorUpdatedFlags",
16247            value: tmp as u32,
16248        })?;
16249        __struct.id = buf.get_u8();
16250        Ok(__struct)
16251    }
16252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16253        let mut __tmp = BytesMut::new(bytes);
16254        #[allow(clippy::absurd_extreme_comparisons)]
16255        #[allow(unused_comparisons)]
16256        if __tmp.remaining() < Self::ENCODED_LEN {
16257            panic!(
16258                "buffer is too small (need {} bytes, but got {})",
16259                Self::ENCODED_LEN,
16260                __tmp.remaining(),
16261            )
16262        }
16263        __tmp.put_u64_le(self.time_usec);
16264        __tmp.put_f32_le(self.xacc);
16265        __tmp.put_f32_le(self.yacc);
16266        __tmp.put_f32_le(self.zacc);
16267        __tmp.put_f32_le(self.xgyro);
16268        __tmp.put_f32_le(self.ygyro);
16269        __tmp.put_f32_le(self.zgyro);
16270        __tmp.put_f32_le(self.xmag);
16271        __tmp.put_f32_le(self.ymag);
16272        __tmp.put_f32_le(self.zmag);
16273        __tmp.put_f32_le(self.abs_pressure);
16274        __tmp.put_f32_le(self.diff_pressure);
16275        __tmp.put_f32_le(self.pressure_alt);
16276        __tmp.put_f32_le(self.temperature);
16277        __tmp.put_u32_le(self.fields_updated.bits());
16278        if matches!(version, MavlinkVersion::V2) {
16279            __tmp.put_u8(self.id);
16280            let len = __tmp.len();
16281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16282        } else {
16283            __tmp.len()
16284        }
16285    }
16286}
16287#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16288#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16289#[doc = ""]
16290#[doc = "ID: 90"]
16291#[derive(Debug, Clone, PartialEq)]
16292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16294#[cfg_attr(feature = "ts", derive(TS))]
16295#[cfg_attr(feature = "ts", ts(export))]
16296pub struct HIL_STATE_DATA {
16297    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16298    pub time_usec: u64,
16299    #[doc = "Roll angle"]
16300    pub roll: f32,
16301    #[doc = "Pitch angle"]
16302    pub pitch: f32,
16303    #[doc = "Yaw angle"]
16304    pub yaw: f32,
16305    #[doc = "Body frame roll / phi angular speed"]
16306    pub rollspeed: f32,
16307    #[doc = "Body frame pitch / theta angular speed"]
16308    pub pitchspeed: f32,
16309    #[doc = "Body frame yaw / psi angular speed"]
16310    pub yawspeed: f32,
16311    #[doc = "Latitude"]
16312    pub lat: i32,
16313    #[doc = "Longitude"]
16314    pub lon: i32,
16315    #[doc = "Altitude"]
16316    pub alt: i32,
16317    #[doc = "Ground X Speed (Latitude)"]
16318    pub vx: i16,
16319    #[doc = "Ground Y Speed (Longitude)"]
16320    pub vy: i16,
16321    #[doc = "Ground Z Speed (Altitude)"]
16322    pub vz: i16,
16323    #[doc = "X acceleration"]
16324    pub xacc: i16,
16325    #[doc = "Y acceleration"]
16326    pub yacc: i16,
16327    #[doc = "Z acceleration"]
16328    pub zacc: i16,
16329}
16330impl HIL_STATE_DATA {
16331    pub const ENCODED_LEN: usize = 56usize;
16332    pub const DEFAULT: Self = Self {
16333        time_usec: 0_u64,
16334        roll: 0.0_f32,
16335        pitch: 0.0_f32,
16336        yaw: 0.0_f32,
16337        rollspeed: 0.0_f32,
16338        pitchspeed: 0.0_f32,
16339        yawspeed: 0.0_f32,
16340        lat: 0_i32,
16341        lon: 0_i32,
16342        alt: 0_i32,
16343        vx: 0_i16,
16344        vy: 0_i16,
16345        vz: 0_i16,
16346        xacc: 0_i16,
16347        yacc: 0_i16,
16348        zacc: 0_i16,
16349    };
16350    #[cfg(feature = "arbitrary")]
16351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16352        use arbitrary::{Arbitrary, Unstructured};
16353        let mut buf = [0u8; 1024];
16354        rng.fill_bytes(&mut buf);
16355        let mut unstructured = Unstructured::new(&buf);
16356        Self::arbitrary(&mut unstructured).unwrap_or_default()
16357    }
16358}
16359impl Default for HIL_STATE_DATA {
16360    fn default() -> Self {
16361        Self::DEFAULT.clone()
16362    }
16363}
16364impl MessageData for HIL_STATE_DATA {
16365    type Message = MavMessage;
16366    const ID: u32 = 90u32;
16367    const NAME: &'static str = "HIL_STATE";
16368    const EXTRA_CRC: u8 = 183u8;
16369    const ENCODED_LEN: usize = 56usize;
16370    fn deser(
16371        _version: MavlinkVersion,
16372        __input: &[u8],
16373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16374        let avail_len = __input.len();
16375        let mut payload_buf = [0; Self::ENCODED_LEN];
16376        let mut buf = if avail_len < Self::ENCODED_LEN {
16377            payload_buf[0..avail_len].copy_from_slice(__input);
16378            Bytes::new(&payload_buf)
16379        } else {
16380            Bytes::new(__input)
16381        };
16382        let mut __struct = Self::default();
16383        __struct.time_usec = buf.get_u64_le();
16384        __struct.roll = buf.get_f32_le();
16385        __struct.pitch = buf.get_f32_le();
16386        __struct.yaw = buf.get_f32_le();
16387        __struct.rollspeed = buf.get_f32_le();
16388        __struct.pitchspeed = buf.get_f32_le();
16389        __struct.yawspeed = buf.get_f32_le();
16390        __struct.lat = buf.get_i32_le();
16391        __struct.lon = buf.get_i32_le();
16392        __struct.alt = buf.get_i32_le();
16393        __struct.vx = buf.get_i16_le();
16394        __struct.vy = buf.get_i16_le();
16395        __struct.vz = buf.get_i16_le();
16396        __struct.xacc = buf.get_i16_le();
16397        __struct.yacc = buf.get_i16_le();
16398        __struct.zacc = buf.get_i16_le();
16399        Ok(__struct)
16400    }
16401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16402        let mut __tmp = BytesMut::new(bytes);
16403        #[allow(clippy::absurd_extreme_comparisons)]
16404        #[allow(unused_comparisons)]
16405        if __tmp.remaining() < Self::ENCODED_LEN {
16406            panic!(
16407                "buffer is too small (need {} bytes, but got {})",
16408                Self::ENCODED_LEN,
16409                __tmp.remaining(),
16410            )
16411        }
16412        __tmp.put_u64_le(self.time_usec);
16413        __tmp.put_f32_le(self.roll);
16414        __tmp.put_f32_le(self.pitch);
16415        __tmp.put_f32_le(self.yaw);
16416        __tmp.put_f32_le(self.rollspeed);
16417        __tmp.put_f32_le(self.pitchspeed);
16418        __tmp.put_f32_le(self.yawspeed);
16419        __tmp.put_i32_le(self.lat);
16420        __tmp.put_i32_le(self.lon);
16421        __tmp.put_i32_le(self.alt);
16422        __tmp.put_i16_le(self.vx);
16423        __tmp.put_i16_le(self.vy);
16424        __tmp.put_i16_le(self.vz);
16425        __tmp.put_i16_le(self.xacc);
16426        __tmp.put_i16_le(self.yacc);
16427        __tmp.put_i16_le(self.zacc);
16428        if matches!(version, MavlinkVersion::V2) {
16429            let len = __tmp.len();
16430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16431        } else {
16432            __tmp.len()
16433        }
16434    }
16435}
16436#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16437#[doc = ""]
16438#[doc = "ID: 115"]
16439#[derive(Debug, Clone, PartialEq)]
16440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16442#[cfg_attr(feature = "ts", derive(TS))]
16443#[cfg_attr(feature = "ts", ts(export))]
16444pub struct HIL_STATE_QUATERNION_DATA {
16445    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16446    pub time_usec: u64,
16447    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16450    pub attitude_quaternion: [f32; 4],
16451    #[doc = "Body frame roll / phi angular speed"]
16452    pub rollspeed: f32,
16453    #[doc = "Body frame pitch / theta angular speed"]
16454    pub pitchspeed: f32,
16455    #[doc = "Body frame yaw / psi angular speed"]
16456    pub yawspeed: f32,
16457    #[doc = "Latitude"]
16458    pub lat: i32,
16459    #[doc = "Longitude"]
16460    pub lon: i32,
16461    #[doc = "Altitude"]
16462    pub alt: i32,
16463    #[doc = "Ground X Speed (Latitude)"]
16464    pub vx: i16,
16465    #[doc = "Ground Y Speed (Longitude)"]
16466    pub vy: i16,
16467    #[doc = "Ground Z Speed (Altitude)"]
16468    pub vz: i16,
16469    #[doc = "Indicated airspeed"]
16470    pub ind_airspeed: u16,
16471    #[doc = "True airspeed"]
16472    pub true_airspeed: u16,
16473    #[doc = "X acceleration"]
16474    pub xacc: i16,
16475    #[doc = "Y acceleration"]
16476    pub yacc: i16,
16477    #[doc = "Z acceleration"]
16478    pub zacc: i16,
16479}
16480impl HIL_STATE_QUATERNION_DATA {
16481    pub const ENCODED_LEN: usize = 64usize;
16482    pub const DEFAULT: Self = Self {
16483        time_usec: 0_u64,
16484        attitude_quaternion: [0.0_f32; 4usize],
16485        rollspeed: 0.0_f32,
16486        pitchspeed: 0.0_f32,
16487        yawspeed: 0.0_f32,
16488        lat: 0_i32,
16489        lon: 0_i32,
16490        alt: 0_i32,
16491        vx: 0_i16,
16492        vy: 0_i16,
16493        vz: 0_i16,
16494        ind_airspeed: 0_u16,
16495        true_airspeed: 0_u16,
16496        xacc: 0_i16,
16497        yacc: 0_i16,
16498        zacc: 0_i16,
16499    };
16500    #[cfg(feature = "arbitrary")]
16501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16502        use arbitrary::{Arbitrary, Unstructured};
16503        let mut buf = [0u8; 1024];
16504        rng.fill_bytes(&mut buf);
16505        let mut unstructured = Unstructured::new(&buf);
16506        Self::arbitrary(&mut unstructured).unwrap_or_default()
16507    }
16508}
16509impl Default for HIL_STATE_QUATERNION_DATA {
16510    fn default() -> Self {
16511        Self::DEFAULT.clone()
16512    }
16513}
16514impl MessageData for HIL_STATE_QUATERNION_DATA {
16515    type Message = MavMessage;
16516    const ID: u32 = 115u32;
16517    const NAME: &'static str = "HIL_STATE_QUATERNION";
16518    const EXTRA_CRC: u8 = 4u8;
16519    const ENCODED_LEN: usize = 64usize;
16520    fn deser(
16521        _version: MavlinkVersion,
16522        __input: &[u8],
16523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16524        let avail_len = __input.len();
16525        let mut payload_buf = [0; Self::ENCODED_LEN];
16526        let mut buf = if avail_len < Self::ENCODED_LEN {
16527            payload_buf[0..avail_len].copy_from_slice(__input);
16528            Bytes::new(&payload_buf)
16529        } else {
16530            Bytes::new(__input)
16531        };
16532        let mut __struct = Self::default();
16533        __struct.time_usec = buf.get_u64_le();
16534        for v in &mut __struct.attitude_quaternion {
16535            let val = buf.get_f32_le();
16536            *v = val;
16537        }
16538        __struct.rollspeed = buf.get_f32_le();
16539        __struct.pitchspeed = buf.get_f32_le();
16540        __struct.yawspeed = buf.get_f32_le();
16541        __struct.lat = buf.get_i32_le();
16542        __struct.lon = buf.get_i32_le();
16543        __struct.alt = buf.get_i32_le();
16544        __struct.vx = buf.get_i16_le();
16545        __struct.vy = buf.get_i16_le();
16546        __struct.vz = buf.get_i16_le();
16547        __struct.ind_airspeed = buf.get_u16_le();
16548        __struct.true_airspeed = buf.get_u16_le();
16549        __struct.xacc = buf.get_i16_le();
16550        __struct.yacc = buf.get_i16_le();
16551        __struct.zacc = buf.get_i16_le();
16552        Ok(__struct)
16553    }
16554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16555        let mut __tmp = BytesMut::new(bytes);
16556        #[allow(clippy::absurd_extreme_comparisons)]
16557        #[allow(unused_comparisons)]
16558        if __tmp.remaining() < Self::ENCODED_LEN {
16559            panic!(
16560                "buffer is too small (need {} bytes, but got {})",
16561                Self::ENCODED_LEN,
16562                __tmp.remaining(),
16563            )
16564        }
16565        __tmp.put_u64_le(self.time_usec);
16566        for val in &self.attitude_quaternion {
16567            __tmp.put_f32_le(*val);
16568        }
16569        __tmp.put_f32_le(self.rollspeed);
16570        __tmp.put_f32_le(self.pitchspeed);
16571        __tmp.put_f32_le(self.yawspeed);
16572        __tmp.put_i32_le(self.lat);
16573        __tmp.put_i32_le(self.lon);
16574        __tmp.put_i32_le(self.alt);
16575        __tmp.put_i16_le(self.vx);
16576        __tmp.put_i16_le(self.vy);
16577        __tmp.put_i16_le(self.vz);
16578        __tmp.put_u16_le(self.ind_airspeed);
16579        __tmp.put_u16_le(self.true_airspeed);
16580        __tmp.put_i16_le(self.xacc);
16581        __tmp.put_i16_le(self.yacc);
16582        __tmp.put_i16_le(self.zacc);
16583        if matches!(version, MavlinkVersion::V2) {
16584            let len = __tmp.len();
16585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16586        } else {
16587            __tmp.len()
16588        }
16589    }
16590}
16591#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16592#[doc = ""]
16593#[doc = "ID: 242"]
16594#[derive(Debug, Clone, PartialEq)]
16595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16597#[cfg_attr(feature = "ts", derive(TS))]
16598#[cfg_attr(feature = "ts", ts(export))]
16599pub struct HOME_POSITION_DATA {
16600    #[doc = "Latitude (WGS84)"]
16601    pub latitude: i32,
16602    #[doc = "Longitude (WGS84)"]
16603    pub longitude: i32,
16604    #[doc = "Altitude (MSL). Positive for up."]
16605    pub altitude: i32,
16606    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16607    pub x: f32,
16608    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16609    pub y: f32,
16610    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16611    pub z: f32,
16612    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16615    pub q: [f32; 4],
16616    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16617    pub approach_x: f32,
16618    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16619    pub approach_y: f32,
16620    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16621    pub approach_z: f32,
16622    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16623    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16624    pub time_usec: u64,
16625}
16626impl HOME_POSITION_DATA {
16627    pub const ENCODED_LEN: usize = 60usize;
16628    pub const DEFAULT: Self = Self {
16629        latitude: 0_i32,
16630        longitude: 0_i32,
16631        altitude: 0_i32,
16632        x: 0.0_f32,
16633        y: 0.0_f32,
16634        z: 0.0_f32,
16635        q: [0.0_f32; 4usize],
16636        approach_x: 0.0_f32,
16637        approach_y: 0.0_f32,
16638        approach_z: 0.0_f32,
16639        time_usec: 0_u64,
16640    };
16641    #[cfg(feature = "arbitrary")]
16642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16643        use arbitrary::{Arbitrary, Unstructured};
16644        let mut buf = [0u8; 1024];
16645        rng.fill_bytes(&mut buf);
16646        let mut unstructured = Unstructured::new(&buf);
16647        Self::arbitrary(&mut unstructured).unwrap_or_default()
16648    }
16649}
16650impl Default for HOME_POSITION_DATA {
16651    fn default() -> Self {
16652        Self::DEFAULT.clone()
16653    }
16654}
16655impl MessageData for HOME_POSITION_DATA {
16656    type Message = MavMessage;
16657    const ID: u32 = 242u32;
16658    const NAME: &'static str = "HOME_POSITION";
16659    const EXTRA_CRC: u8 = 104u8;
16660    const ENCODED_LEN: usize = 60usize;
16661    fn deser(
16662        _version: MavlinkVersion,
16663        __input: &[u8],
16664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16665        let avail_len = __input.len();
16666        let mut payload_buf = [0; Self::ENCODED_LEN];
16667        let mut buf = if avail_len < Self::ENCODED_LEN {
16668            payload_buf[0..avail_len].copy_from_slice(__input);
16669            Bytes::new(&payload_buf)
16670        } else {
16671            Bytes::new(__input)
16672        };
16673        let mut __struct = Self::default();
16674        __struct.latitude = buf.get_i32_le();
16675        __struct.longitude = buf.get_i32_le();
16676        __struct.altitude = buf.get_i32_le();
16677        __struct.x = buf.get_f32_le();
16678        __struct.y = buf.get_f32_le();
16679        __struct.z = buf.get_f32_le();
16680        for v in &mut __struct.q {
16681            let val = buf.get_f32_le();
16682            *v = val;
16683        }
16684        __struct.approach_x = buf.get_f32_le();
16685        __struct.approach_y = buf.get_f32_le();
16686        __struct.approach_z = buf.get_f32_le();
16687        __struct.time_usec = buf.get_u64_le();
16688        Ok(__struct)
16689    }
16690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16691        let mut __tmp = BytesMut::new(bytes);
16692        #[allow(clippy::absurd_extreme_comparisons)]
16693        #[allow(unused_comparisons)]
16694        if __tmp.remaining() < Self::ENCODED_LEN {
16695            panic!(
16696                "buffer is too small (need {} bytes, but got {})",
16697                Self::ENCODED_LEN,
16698                __tmp.remaining(),
16699            )
16700        }
16701        __tmp.put_i32_le(self.latitude);
16702        __tmp.put_i32_le(self.longitude);
16703        __tmp.put_i32_le(self.altitude);
16704        __tmp.put_f32_le(self.x);
16705        __tmp.put_f32_le(self.y);
16706        __tmp.put_f32_le(self.z);
16707        for val in &self.q {
16708            __tmp.put_f32_le(*val);
16709        }
16710        __tmp.put_f32_le(self.approach_x);
16711        __tmp.put_f32_le(self.approach_y);
16712        __tmp.put_f32_le(self.approach_z);
16713        if matches!(version, MavlinkVersion::V2) {
16714            __tmp.put_u64_le(self.time_usec);
16715            let len = __tmp.len();
16716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16717        } else {
16718            __tmp.len()
16719        }
16720    }
16721}
16722#[doc = "Temperature and humidity from hygrometer."]
16723#[doc = ""]
16724#[doc = "ID: 12920"]
16725#[derive(Debug, Clone, PartialEq)]
16726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16728#[cfg_attr(feature = "ts", derive(TS))]
16729#[cfg_attr(feature = "ts", ts(export))]
16730pub struct HYGROMETER_SENSOR_DATA {
16731    #[doc = "Temperature"]
16732    pub temperature: i16,
16733    #[doc = "Humidity"]
16734    pub humidity: u16,
16735    #[doc = "Hygrometer ID"]
16736    pub id: u8,
16737}
16738impl HYGROMETER_SENSOR_DATA {
16739    pub const ENCODED_LEN: usize = 5usize;
16740    pub const DEFAULT: Self = Self {
16741        temperature: 0_i16,
16742        humidity: 0_u16,
16743        id: 0_u8,
16744    };
16745    #[cfg(feature = "arbitrary")]
16746    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16747        use arbitrary::{Arbitrary, Unstructured};
16748        let mut buf = [0u8; 1024];
16749        rng.fill_bytes(&mut buf);
16750        let mut unstructured = Unstructured::new(&buf);
16751        Self::arbitrary(&mut unstructured).unwrap_or_default()
16752    }
16753}
16754impl Default for HYGROMETER_SENSOR_DATA {
16755    fn default() -> Self {
16756        Self::DEFAULT.clone()
16757    }
16758}
16759impl MessageData for HYGROMETER_SENSOR_DATA {
16760    type Message = MavMessage;
16761    const ID: u32 = 12920u32;
16762    const NAME: &'static str = "HYGROMETER_SENSOR";
16763    const EXTRA_CRC: u8 = 20u8;
16764    const ENCODED_LEN: usize = 5usize;
16765    fn deser(
16766        _version: MavlinkVersion,
16767        __input: &[u8],
16768    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16769        let avail_len = __input.len();
16770        let mut payload_buf = [0; Self::ENCODED_LEN];
16771        let mut buf = if avail_len < Self::ENCODED_LEN {
16772            payload_buf[0..avail_len].copy_from_slice(__input);
16773            Bytes::new(&payload_buf)
16774        } else {
16775            Bytes::new(__input)
16776        };
16777        let mut __struct = Self::default();
16778        __struct.temperature = buf.get_i16_le();
16779        __struct.humidity = buf.get_u16_le();
16780        __struct.id = buf.get_u8();
16781        Ok(__struct)
16782    }
16783    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16784        let mut __tmp = BytesMut::new(bytes);
16785        #[allow(clippy::absurd_extreme_comparisons)]
16786        #[allow(unused_comparisons)]
16787        if __tmp.remaining() < Self::ENCODED_LEN {
16788            panic!(
16789                "buffer is too small (need {} bytes, but got {})",
16790                Self::ENCODED_LEN,
16791                __tmp.remaining(),
16792            )
16793        }
16794        __tmp.put_i16_le(self.temperature);
16795        __tmp.put_u16_le(self.humidity);
16796        __tmp.put_u8(self.id);
16797        if matches!(version, MavlinkVersion::V2) {
16798            let len = __tmp.len();
16799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16800        } else {
16801            __tmp.len()
16802        }
16803    }
16804}
16805#[doc = "Illuminator status."]
16806#[doc = ""]
16807#[doc = "ID: 440"]
16808#[derive(Debug, Clone, PartialEq)]
16809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16811#[cfg_attr(feature = "ts", derive(TS))]
16812#[cfg_attr(feature = "ts", ts(export))]
16813pub struct ILLUMINATOR_STATUS_DATA {
16814    #[doc = "Time since the start-up of the illuminator in ms"]
16815    pub uptime_ms: u32,
16816    #[doc = "Errors"]
16817    pub error_status: IlluminatorErrorFlags,
16818    #[doc = "Illuminator brightness"]
16819    pub brightness: f32,
16820    #[doc = "Illuminator strobing period in seconds"]
16821    pub strobe_period: f32,
16822    #[doc = "Illuminator strobing duty cycle"]
16823    pub strobe_duty_cycle: f32,
16824    #[doc = "Temperature in Celsius"]
16825    pub temp_c: f32,
16826    #[doc = "Minimum strobing period in seconds"]
16827    pub min_strobe_period: f32,
16828    #[doc = "Maximum strobing period in seconds"]
16829    pub max_strobe_period: f32,
16830    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16831    pub enable: u8,
16832    #[doc = "Supported illuminator modes"]
16833    pub mode_bitmask: IlluminatorMode,
16834    #[doc = "Illuminator mode"]
16835    pub mode: IlluminatorMode,
16836}
16837impl ILLUMINATOR_STATUS_DATA {
16838    pub const ENCODED_LEN: usize = 35usize;
16839    pub const DEFAULT: Self = Self {
16840        uptime_ms: 0_u32,
16841        error_status: IlluminatorErrorFlags::DEFAULT,
16842        brightness: 0.0_f32,
16843        strobe_period: 0.0_f32,
16844        strobe_duty_cycle: 0.0_f32,
16845        temp_c: 0.0_f32,
16846        min_strobe_period: 0.0_f32,
16847        max_strobe_period: 0.0_f32,
16848        enable: 0_u8,
16849        mode_bitmask: IlluminatorMode::DEFAULT,
16850        mode: IlluminatorMode::DEFAULT,
16851    };
16852    #[cfg(feature = "arbitrary")]
16853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16854        use arbitrary::{Arbitrary, Unstructured};
16855        let mut buf = [0u8; 1024];
16856        rng.fill_bytes(&mut buf);
16857        let mut unstructured = Unstructured::new(&buf);
16858        Self::arbitrary(&mut unstructured).unwrap_or_default()
16859    }
16860}
16861impl Default for ILLUMINATOR_STATUS_DATA {
16862    fn default() -> Self {
16863        Self::DEFAULT.clone()
16864    }
16865}
16866impl MessageData for ILLUMINATOR_STATUS_DATA {
16867    type Message = MavMessage;
16868    const ID: u32 = 440u32;
16869    const NAME: &'static str = "ILLUMINATOR_STATUS";
16870    const EXTRA_CRC: u8 = 66u8;
16871    const ENCODED_LEN: usize = 35usize;
16872    fn deser(
16873        _version: MavlinkVersion,
16874        __input: &[u8],
16875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16876        let avail_len = __input.len();
16877        let mut payload_buf = [0; Self::ENCODED_LEN];
16878        let mut buf = if avail_len < Self::ENCODED_LEN {
16879            payload_buf[0..avail_len].copy_from_slice(__input);
16880            Bytes::new(&payload_buf)
16881        } else {
16882            Bytes::new(__input)
16883        };
16884        let mut __struct = Self::default();
16885        __struct.uptime_ms = buf.get_u32_le();
16886        let tmp = buf.get_u32_le();
16887        __struct.error_status = IlluminatorErrorFlags::from_bits(
16888            tmp & IlluminatorErrorFlags::all().bits(),
16889        )
16890        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16891            flag_type: "IlluminatorErrorFlags",
16892            value: tmp as u32,
16893        })?;
16894        __struct.brightness = buf.get_f32_le();
16895        __struct.strobe_period = buf.get_f32_le();
16896        __struct.strobe_duty_cycle = buf.get_f32_le();
16897        __struct.temp_c = buf.get_f32_le();
16898        __struct.min_strobe_period = buf.get_f32_le();
16899        __struct.max_strobe_period = buf.get_f32_le();
16900        __struct.enable = buf.get_u8();
16901        let tmp = buf.get_u8();
16902        __struct.mode_bitmask =
16903            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16904                enum_type: "IlluminatorMode",
16905                value: tmp as u32,
16906            })?;
16907        let tmp = buf.get_u8();
16908        __struct.mode =
16909            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16910                enum_type: "IlluminatorMode",
16911                value: tmp as u32,
16912            })?;
16913        Ok(__struct)
16914    }
16915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16916        let mut __tmp = BytesMut::new(bytes);
16917        #[allow(clippy::absurd_extreme_comparisons)]
16918        #[allow(unused_comparisons)]
16919        if __tmp.remaining() < Self::ENCODED_LEN {
16920            panic!(
16921                "buffer is too small (need {} bytes, but got {})",
16922                Self::ENCODED_LEN,
16923                __tmp.remaining(),
16924            )
16925        }
16926        __tmp.put_u32_le(self.uptime_ms);
16927        __tmp.put_u32_le(self.error_status.bits());
16928        __tmp.put_f32_le(self.brightness);
16929        __tmp.put_f32_le(self.strobe_period);
16930        __tmp.put_f32_le(self.strobe_duty_cycle);
16931        __tmp.put_f32_le(self.temp_c);
16932        __tmp.put_f32_le(self.min_strobe_period);
16933        __tmp.put_f32_le(self.max_strobe_period);
16934        __tmp.put_u8(self.enable);
16935        __tmp.put_u8(self.mode_bitmask as u8);
16936        __tmp.put_u8(self.mode as u8);
16937        if matches!(version, MavlinkVersion::V2) {
16938            let len = __tmp.len();
16939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16940        } else {
16941            __tmp.len()
16942        }
16943    }
16944}
16945#[doc = "Status of the Iridium SBD link."]
16946#[doc = ""]
16947#[doc = "ID: 335"]
16948#[derive(Debug, Clone, PartialEq)]
16949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16951#[cfg_attr(feature = "ts", derive(TS))]
16952#[cfg_attr(feature = "ts", ts(export))]
16953pub struct ISBD_LINK_STATUS_DATA {
16954    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16955    pub timestamp: u64,
16956    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16957    pub last_heartbeat: u64,
16958    #[doc = "Number of failed SBD sessions."]
16959    pub failed_sessions: u16,
16960    #[doc = "Number of successful SBD sessions."]
16961    pub successful_sessions: u16,
16962    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16963    pub signal_quality: u8,
16964    #[doc = "1: Ring call pending, 0: No call pending."]
16965    pub ring_pending: u8,
16966    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16967    pub tx_session_pending: u8,
16968    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16969    pub rx_session_pending: u8,
16970}
16971impl ISBD_LINK_STATUS_DATA {
16972    pub const ENCODED_LEN: usize = 24usize;
16973    pub const DEFAULT: Self = Self {
16974        timestamp: 0_u64,
16975        last_heartbeat: 0_u64,
16976        failed_sessions: 0_u16,
16977        successful_sessions: 0_u16,
16978        signal_quality: 0_u8,
16979        ring_pending: 0_u8,
16980        tx_session_pending: 0_u8,
16981        rx_session_pending: 0_u8,
16982    };
16983    #[cfg(feature = "arbitrary")]
16984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16985        use arbitrary::{Arbitrary, Unstructured};
16986        let mut buf = [0u8; 1024];
16987        rng.fill_bytes(&mut buf);
16988        let mut unstructured = Unstructured::new(&buf);
16989        Self::arbitrary(&mut unstructured).unwrap_or_default()
16990    }
16991}
16992impl Default for ISBD_LINK_STATUS_DATA {
16993    fn default() -> Self {
16994        Self::DEFAULT.clone()
16995    }
16996}
16997impl MessageData for ISBD_LINK_STATUS_DATA {
16998    type Message = MavMessage;
16999    const ID: u32 = 335u32;
17000    const NAME: &'static str = "ISBD_LINK_STATUS";
17001    const EXTRA_CRC: u8 = 225u8;
17002    const ENCODED_LEN: usize = 24usize;
17003    fn deser(
17004        _version: MavlinkVersion,
17005        __input: &[u8],
17006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17007        let avail_len = __input.len();
17008        let mut payload_buf = [0; Self::ENCODED_LEN];
17009        let mut buf = if avail_len < Self::ENCODED_LEN {
17010            payload_buf[0..avail_len].copy_from_slice(__input);
17011            Bytes::new(&payload_buf)
17012        } else {
17013            Bytes::new(__input)
17014        };
17015        let mut __struct = Self::default();
17016        __struct.timestamp = buf.get_u64_le();
17017        __struct.last_heartbeat = buf.get_u64_le();
17018        __struct.failed_sessions = buf.get_u16_le();
17019        __struct.successful_sessions = buf.get_u16_le();
17020        __struct.signal_quality = buf.get_u8();
17021        __struct.ring_pending = buf.get_u8();
17022        __struct.tx_session_pending = buf.get_u8();
17023        __struct.rx_session_pending = buf.get_u8();
17024        Ok(__struct)
17025    }
17026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17027        let mut __tmp = BytesMut::new(bytes);
17028        #[allow(clippy::absurd_extreme_comparisons)]
17029        #[allow(unused_comparisons)]
17030        if __tmp.remaining() < Self::ENCODED_LEN {
17031            panic!(
17032                "buffer is too small (need {} bytes, but got {})",
17033                Self::ENCODED_LEN,
17034                __tmp.remaining(),
17035            )
17036        }
17037        __tmp.put_u64_le(self.timestamp);
17038        __tmp.put_u64_le(self.last_heartbeat);
17039        __tmp.put_u16_le(self.failed_sessions);
17040        __tmp.put_u16_le(self.successful_sessions);
17041        __tmp.put_u8(self.signal_quality);
17042        __tmp.put_u8(self.ring_pending);
17043        __tmp.put_u8(self.tx_session_pending);
17044        __tmp.put_u8(self.rx_session_pending);
17045        if matches!(version, MavlinkVersion::V2) {
17046            let len = __tmp.len();
17047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17048        } else {
17049            __tmp.len()
17050        }
17051    }
17052}
17053#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17054#[doc = ""]
17055#[doc = "ID: 149"]
17056#[derive(Debug, Clone, PartialEq)]
17057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17059#[cfg_attr(feature = "ts", derive(TS))]
17060#[cfg_attr(feature = "ts", ts(export))]
17061pub struct LANDING_TARGET_DATA {
17062    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17063    pub time_usec: u64,
17064    #[doc = "X-axis angular offset of the target from the center of the image"]
17065    pub angle_x: f32,
17066    #[doc = "Y-axis angular offset of the target from the center of the image"]
17067    pub angle_y: f32,
17068    #[doc = "Distance to the target from the vehicle"]
17069    pub distance: f32,
17070    #[doc = "Size of target along x-axis"]
17071    pub size_x: f32,
17072    #[doc = "Size of target along y-axis"]
17073    pub size_y: f32,
17074    #[doc = "The ID of the target if multiple targets are present"]
17075    pub target_num: u8,
17076    #[doc = "Coordinate frame used for following fields."]
17077    pub frame: MavFrame,
17078    #[doc = "X Position of the landing target in MAV_FRAME"]
17079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17080    pub x: f32,
17081    #[doc = "Y Position of the landing target in MAV_FRAME"]
17082    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17083    pub y: f32,
17084    #[doc = "Z Position of the landing target in MAV_FRAME"]
17085    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17086    pub z: f32,
17087    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17089    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17090    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17091    pub q: [f32; 4],
17092    #[doc = "Type of landing target"]
17093    #[cfg_attr(feature = "serde", serde(default))]
17094    pub mavtype: LandingTargetType,
17095    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17096    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17097    pub position_valid: u8,
17098}
17099impl LANDING_TARGET_DATA {
17100    pub const ENCODED_LEN: usize = 60usize;
17101    pub const DEFAULT: Self = Self {
17102        time_usec: 0_u64,
17103        angle_x: 0.0_f32,
17104        angle_y: 0.0_f32,
17105        distance: 0.0_f32,
17106        size_x: 0.0_f32,
17107        size_y: 0.0_f32,
17108        target_num: 0_u8,
17109        frame: MavFrame::DEFAULT,
17110        x: 0.0_f32,
17111        y: 0.0_f32,
17112        z: 0.0_f32,
17113        q: [0.0_f32; 4usize],
17114        mavtype: LandingTargetType::DEFAULT,
17115        position_valid: 0_u8,
17116    };
17117    #[cfg(feature = "arbitrary")]
17118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17119        use arbitrary::{Arbitrary, Unstructured};
17120        let mut buf = [0u8; 1024];
17121        rng.fill_bytes(&mut buf);
17122        let mut unstructured = Unstructured::new(&buf);
17123        Self::arbitrary(&mut unstructured).unwrap_or_default()
17124    }
17125}
17126impl Default for LANDING_TARGET_DATA {
17127    fn default() -> Self {
17128        Self::DEFAULT.clone()
17129    }
17130}
17131impl MessageData for LANDING_TARGET_DATA {
17132    type Message = MavMessage;
17133    const ID: u32 = 149u32;
17134    const NAME: &'static str = "LANDING_TARGET";
17135    const EXTRA_CRC: u8 = 200u8;
17136    const ENCODED_LEN: usize = 60usize;
17137    fn deser(
17138        _version: MavlinkVersion,
17139        __input: &[u8],
17140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17141        let avail_len = __input.len();
17142        let mut payload_buf = [0; Self::ENCODED_LEN];
17143        let mut buf = if avail_len < Self::ENCODED_LEN {
17144            payload_buf[0..avail_len].copy_from_slice(__input);
17145            Bytes::new(&payload_buf)
17146        } else {
17147            Bytes::new(__input)
17148        };
17149        let mut __struct = Self::default();
17150        __struct.time_usec = buf.get_u64_le();
17151        __struct.angle_x = buf.get_f32_le();
17152        __struct.angle_y = buf.get_f32_le();
17153        __struct.distance = buf.get_f32_le();
17154        __struct.size_x = buf.get_f32_le();
17155        __struct.size_y = buf.get_f32_le();
17156        __struct.target_num = buf.get_u8();
17157        let tmp = buf.get_u8();
17158        __struct.frame =
17159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17160                enum_type: "MavFrame",
17161                value: tmp as u32,
17162            })?;
17163        __struct.x = buf.get_f32_le();
17164        __struct.y = buf.get_f32_le();
17165        __struct.z = buf.get_f32_le();
17166        for v in &mut __struct.q {
17167            let val = buf.get_f32_le();
17168            *v = val;
17169        }
17170        let tmp = buf.get_u8();
17171        __struct.mavtype =
17172            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17173                enum_type: "LandingTargetType",
17174                value: tmp as u32,
17175            })?;
17176        __struct.position_valid = buf.get_u8();
17177        Ok(__struct)
17178    }
17179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17180        let mut __tmp = BytesMut::new(bytes);
17181        #[allow(clippy::absurd_extreme_comparisons)]
17182        #[allow(unused_comparisons)]
17183        if __tmp.remaining() < Self::ENCODED_LEN {
17184            panic!(
17185                "buffer is too small (need {} bytes, but got {})",
17186                Self::ENCODED_LEN,
17187                __tmp.remaining(),
17188            )
17189        }
17190        __tmp.put_u64_le(self.time_usec);
17191        __tmp.put_f32_le(self.angle_x);
17192        __tmp.put_f32_le(self.angle_y);
17193        __tmp.put_f32_le(self.distance);
17194        __tmp.put_f32_le(self.size_x);
17195        __tmp.put_f32_le(self.size_y);
17196        __tmp.put_u8(self.target_num);
17197        __tmp.put_u8(self.frame as u8);
17198        if matches!(version, MavlinkVersion::V2) {
17199            __tmp.put_f32_le(self.x);
17200            __tmp.put_f32_le(self.y);
17201            __tmp.put_f32_le(self.z);
17202            for val in &self.q {
17203                __tmp.put_f32_le(*val);
17204            }
17205            __tmp.put_u8(self.mavtype as u8);
17206            __tmp.put_u8(self.position_valid);
17207            let len = __tmp.len();
17208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17209        } else {
17210            __tmp.len()
17211        }
17212    }
17213}
17214#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17215#[doc = ""]
17216#[doc = "ID: 8"]
17217#[derive(Debug, Clone, PartialEq)]
17218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17220#[cfg_attr(feature = "ts", derive(TS))]
17221#[cfg_attr(feature = "ts", ts(export))]
17222pub struct LINK_NODE_STATUS_DATA {
17223    #[doc = "Timestamp (time since system boot)."]
17224    pub timestamp: u64,
17225    #[doc = "Transmit rate"]
17226    pub tx_rate: u32,
17227    #[doc = "Receive rate"]
17228    pub rx_rate: u32,
17229    #[doc = "Messages sent"]
17230    pub messages_sent: u32,
17231    #[doc = "Messages received (estimated from counting seq)"]
17232    pub messages_received: u32,
17233    #[doc = "Messages lost (estimated from counting seq)"]
17234    pub messages_lost: u32,
17235    #[doc = "Number of bytes that could not be parsed correctly."]
17236    pub rx_parse_err: u16,
17237    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17238    pub tx_overflows: u16,
17239    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17240    pub rx_overflows: u16,
17241    #[doc = "Remaining free transmit buffer space"]
17242    pub tx_buf: u8,
17243    #[doc = "Remaining free receive buffer space"]
17244    pub rx_buf: u8,
17245}
17246impl LINK_NODE_STATUS_DATA {
17247    pub const ENCODED_LEN: usize = 36usize;
17248    pub const DEFAULT: Self = Self {
17249        timestamp: 0_u64,
17250        tx_rate: 0_u32,
17251        rx_rate: 0_u32,
17252        messages_sent: 0_u32,
17253        messages_received: 0_u32,
17254        messages_lost: 0_u32,
17255        rx_parse_err: 0_u16,
17256        tx_overflows: 0_u16,
17257        rx_overflows: 0_u16,
17258        tx_buf: 0_u8,
17259        rx_buf: 0_u8,
17260    };
17261    #[cfg(feature = "arbitrary")]
17262    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17263        use arbitrary::{Arbitrary, Unstructured};
17264        let mut buf = [0u8; 1024];
17265        rng.fill_bytes(&mut buf);
17266        let mut unstructured = Unstructured::new(&buf);
17267        Self::arbitrary(&mut unstructured).unwrap_or_default()
17268    }
17269}
17270impl Default for LINK_NODE_STATUS_DATA {
17271    fn default() -> Self {
17272        Self::DEFAULT.clone()
17273    }
17274}
17275impl MessageData for LINK_NODE_STATUS_DATA {
17276    type Message = MavMessage;
17277    const ID: u32 = 8u32;
17278    const NAME: &'static str = "LINK_NODE_STATUS";
17279    const EXTRA_CRC: u8 = 117u8;
17280    const ENCODED_LEN: usize = 36usize;
17281    fn deser(
17282        _version: MavlinkVersion,
17283        __input: &[u8],
17284    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17285        let avail_len = __input.len();
17286        let mut payload_buf = [0; Self::ENCODED_LEN];
17287        let mut buf = if avail_len < Self::ENCODED_LEN {
17288            payload_buf[0..avail_len].copy_from_slice(__input);
17289            Bytes::new(&payload_buf)
17290        } else {
17291            Bytes::new(__input)
17292        };
17293        let mut __struct = Self::default();
17294        __struct.timestamp = buf.get_u64_le();
17295        __struct.tx_rate = buf.get_u32_le();
17296        __struct.rx_rate = buf.get_u32_le();
17297        __struct.messages_sent = buf.get_u32_le();
17298        __struct.messages_received = buf.get_u32_le();
17299        __struct.messages_lost = buf.get_u32_le();
17300        __struct.rx_parse_err = buf.get_u16_le();
17301        __struct.tx_overflows = buf.get_u16_le();
17302        __struct.rx_overflows = buf.get_u16_le();
17303        __struct.tx_buf = buf.get_u8();
17304        __struct.rx_buf = buf.get_u8();
17305        Ok(__struct)
17306    }
17307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17308        let mut __tmp = BytesMut::new(bytes);
17309        #[allow(clippy::absurd_extreme_comparisons)]
17310        #[allow(unused_comparisons)]
17311        if __tmp.remaining() < Self::ENCODED_LEN {
17312            panic!(
17313                "buffer is too small (need {} bytes, but got {})",
17314                Self::ENCODED_LEN,
17315                __tmp.remaining(),
17316            )
17317        }
17318        __tmp.put_u64_le(self.timestamp);
17319        __tmp.put_u32_le(self.tx_rate);
17320        __tmp.put_u32_le(self.rx_rate);
17321        __tmp.put_u32_le(self.messages_sent);
17322        __tmp.put_u32_le(self.messages_received);
17323        __tmp.put_u32_le(self.messages_lost);
17324        __tmp.put_u16_le(self.rx_parse_err);
17325        __tmp.put_u16_le(self.tx_overflows);
17326        __tmp.put_u16_le(self.rx_overflows);
17327        __tmp.put_u8(self.tx_buf);
17328        __tmp.put_u8(self.rx_buf);
17329        if matches!(version, MavlinkVersion::V2) {
17330            let len = __tmp.len();
17331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17332        } else {
17333            __tmp.len()
17334        }
17335    }
17336}
17337#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17338#[doc = ""]
17339#[doc = "ID: 32"]
17340#[derive(Debug, Clone, PartialEq)]
17341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17343#[cfg_attr(feature = "ts", derive(TS))]
17344#[cfg_attr(feature = "ts", ts(export))]
17345pub struct LOCAL_POSITION_NED_DATA {
17346    #[doc = "Timestamp (time since system boot)."]
17347    pub time_boot_ms: u32,
17348    #[doc = "X Position"]
17349    pub x: f32,
17350    #[doc = "Y Position"]
17351    pub y: f32,
17352    #[doc = "Z Position"]
17353    pub z: f32,
17354    #[doc = "X Speed"]
17355    pub vx: f32,
17356    #[doc = "Y Speed"]
17357    pub vy: f32,
17358    #[doc = "Z Speed"]
17359    pub vz: f32,
17360}
17361impl LOCAL_POSITION_NED_DATA {
17362    pub const ENCODED_LEN: usize = 28usize;
17363    pub const DEFAULT: Self = Self {
17364        time_boot_ms: 0_u32,
17365        x: 0.0_f32,
17366        y: 0.0_f32,
17367        z: 0.0_f32,
17368        vx: 0.0_f32,
17369        vy: 0.0_f32,
17370        vz: 0.0_f32,
17371    };
17372    #[cfg(feature = "arbitrary")]
17373    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17374        use arbitrary::{Arbitrary, Unstructured};
17375        let mut buf = [0u8; 1024];
17376        rng.fill_bytes(&mut buf);
17377        let mut unstructured = Unstructured::new(&buf);
17378        Self::arbitrary(&mut unstructured).unwrap_or_default()
17379    }
17380}
17381impl Default for LOCAL_POSITION_NED_DATA {
17382    fn default() -> Self {
17383        Self::DEFAULT.clone()
17384    }
17385}
17386impl MessageData for LOCAL_POSITION_NED_DATA {
17387    type Message = MavMessage;
17388    const ID: u32 = 32u32;
17389    const NAME: &'static str = "LOCAL_POSITION_NED";
17390    const EXTRA_CRC: u8 = 185u8;
17391    const ENCODED_LEN: usize = 28usize;
17392    fn deser(
17393        _version: MavlinkVersion,
17394        __input: &[u8],
17395    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17396        let avail_len = __input.len();
17397        let mut payload_buf = [0; Self::ENCODED_LEN];
17398        let mut buf = if avail_len < Self::ENCODED_LEN {
17399            payload_buf[0..avail_len].copy_from_slice(__input);
17400            Bytes::new(&payload_buf)
17401        } else {
17402            Bytes::new(__input)
17403        };
17404        let mut __struct = Self::default();
17405        __struct.time_boot_ms = buf.get_u32_le();
17406        __struct.x = buf.get_f32_le();
17407        __struct.y = buf.get_f32_le();
17408        __struct.z = buf.get_f32_le();
17409        __struct.vx = buf.get_f32_le();
17410        __struct.vy = buf.get_f32_le();
17411        __struct.vz = buf.get_f32_le();
17412        Ok(__struct)
17413    }
17414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17415        let mut __tmp = BytesMut::new(bytes);
17416        #[allow(clippy::absurd_extreme_comparisons)]
17417        #[allow(unused_comparisons)]
17418        if __tmp.remaining() < Self::ENCODED_LEN {
17419            panic!(
17420                "buffer is too small (need {} bytes, but got {})",
17421                Self::ENCODED_LEN,
17422                __tmp.remaining(),
17423            )
17424        }
17425        __tmp.put_u32_le(self.time_boot_ms);
17426        __tmp.put_f32_le(self.x);
17427        __tmp.put_f32_le(self.y);
17428        __tmp.put_f32_le(self.z);
17429        __tmp.put_f32_le(self.vx);
17430        __tmp.put_f32_le(self.vy);
17431        __tmp.put_f32_le(self.vz);
17432        if matches!(version, MavlinkVersion::V2) {
17433            let len = __tmp.len();
17434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17435        } else {
17436            __tmp.len()
17437        }
17438    }
17439}
17440#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17441#[doc = ""]
17442#[doc = "ID: 64"]
17443#[derive(Debug, Clone, PartialEq)]
17444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17446#[cfg_attr(feature = "ts", derive(TS))]
17447#[cfg_attr(feature = "ts", ts(export))]
17448pub struct LOCAL_POSITION_NED_COV_DATA {
17449    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17450    pub time_usec: u64,
17451    #[doc = "X Position"]
17452    pub x: f32,
17453    #[doc = "Y Position"]
17454    pub y: f32,
17455    #[doc = "Z Position"]
17456    pub z: f32,
17457    #[doc = "X Speed"]
17458    pub vx: f32,
17459    #[doc = "Y Speed"]
17460    pub vy: f32,
17461    #[doc = "Z Speed"]
17462    pub vz: f32,
17463    #[doc = "X Acceleration"]
17464    pub ax: f32,
17465    #[doc = "Y Acceleration"]
17466    pub ay: f32,
17467    #[doc = "Z Acceleration"]
17468    pub az: f32,
17469    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17472    pub covariance: [f32; 45],
17473    #[doc = "Class id of the estimator this estimate originated from."]
17474    pub estimator_type: MavEstimatorType,
17475}
17476impl LOCAL_POSITION_NED_COV_DATA {
17477    pub const ENCODED_LEN: usize = 225usize;
17478    pub const DEFAULT: Self = Self {
17479        time_usec: 0_u64,
17480        x: 0.0_f32,
17481        y: 0.0_f32,
17482        z: 0.0_f32,
17483        vx: 0.0_f32,
17484        vy: 0.0_f32,
17485        vz: 0.0_f32,
17486        ax: 0.0_f32,
17487        ay: 0.0_f32,
17488        az: 0.0_f32,
17489        covariance: [0.0_f32; 45usize],
17490        estimator_type: MavEstimatorType::DEFAULT,
17491    };
17492    #[cfg(feature = "arbitrary")]
17493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17494        use arbitrary::{Arbitrary, Unstructured};
17495        let mut buf = [0u8; 1024];
17496        rng.fill_bytes(&mut buf);
17497        let mut unstructured = Unstructured::new(&buf);
17498        Self::arbitrary(&mut unstructured).unwrap_or_default()
17499    }
17500}
17501impl Default for LOCAL_POSITION_NED_COV_DATA {
17502    fn default() -> Self {
17503        Self::DEFAULT.clone()
17504    }
17505}
17506impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17507    type Message = MavMessage;
17508    const ID: u32 = 64u32;
17509    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17510    const EXTRA_CRC: u8 = 191u8;
17511    const ENCODED_LEN: usize = 225usize;
17512    fn deser(
17513        _version: MavlinkVersion,
17514        __input: &[u8],
17515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17516        let avail_len = __input.len();
17517        let mut payload_buf = [0; Self::ENCODED_LEN];
17518        let mut buf = if avail_len < Self::ENCODED_LEN {
17519            payload_buf[0..avail_len].copy_from_slice(__input);
17520            Bytes::new(&payload_buf)
17521        } else {
17522            Bytes::new(__input)
17523        };
17524        let mut __struct = Self::default();
17525        __struct.time_usec = buf.get_u64_le();
17526        __struct.x = buf.get_f32_le();
17527        __struct.y = buf.get_f32_le();
17528        __struct.z = buf.get_f32_le();
17529        __struct.vx = buf.get_f32_le();
17530        __struct.vy = buf.get_f32_le();
17531        __struct.vz = buf.get_f32_le();
17532        __struct.ax = buf.get_f32_le();
17533        __struct.ay = buf.get_f32_le();
17534        __struct.az = buf.get_f32_le();
17535        for v in &mut __struct.covariance {
17536            let val = buf.get_f32_le();
17537            *v = val;
17538        }
17539        let tmp = buf.get_u8();
17540        __struct.estimator_type =
17541            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17542                enum_type: "MavEstimatorType",
17543                value: tmp as u32,
17544            })?;
17545        Ok(__struct)
17546    }
17547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17548        let mut __tmp = BytesMut::new(bytes);
17549        #[allow(clippy::absurd_extreme_comparisons)]
17550        #[allow(unused_comparisons)]
17551        if __tmp.remaining() < Self::ENCODED_LEN {
17552            panic!(
17553                "buffer is too small (need {} bytes, but got {})",
17554                Self::ENCODED_LEN,
17555                __tmp.remaining(),
17556            )
17557        }
17558        __tmp.put_u64_le(self.time_usec);
17559        __tmp.put_f32_le(self.x);
17560        __tmp.put_f32_le(self.y);
17561        __tmp.put_f32_le(self.z);
17562        __tmp.put_f32_le(self.vx);
17563        __tmp.put_f32_le(self.vy);
17564        __tmp.put_f32_le(self.vz);
17565        __tmp.put_f32_le(self.ax);
17566        __tmp.put_f32_le(self.ay);
17567        __tmp.put_f32_le(self.az);
17568        for val in &self.covariance {
17569            __tmp.put_f32_le(*val);
17570        }
17571        __tmp.put_u8(self.estimator_type as u8);
17572        if matches!(version, MavlinkVersion::V2) {
17573            let len = __tmp.len();
17574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17575        } else {
17576            __tmp.len()
17577        }
17578    }
17579}
17580#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17581#[doc = ""]
17582#[doc = "ID: 89"]
17583#[derive(Debug, Clone, PartialEq)]
17584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17586#[cfg_attr(feature = "ts", derive(TS))]
17587#[cfg_attr(feature = "ts", ts(export))]
17588pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17589    #[doc = "Timestamp (time since system boot)."]
17590    pub time_boot_ms: u32,
17591    #[doc = "X Position"]
17592    pub x: f32,
17593    #[doc = "Y Position"]
17594    pub y: f32,
17595    #[doc = "Z Position"]
17596    pub z: f32,
17597    #[doc = "Roll"]
17598    pub roll: f32,
17599    #[doc = "Pitch"]
17600    pub pitch: f32,
17601    #[doc = "Yaw"]
17602    pub yaw: f32,
17603}
17604impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17605    pub const ENCODED_LEN: usize = 28usize;
17606    pub const DEFAULT: Self = Self {
17607        time_boot_ms: 0_u32,
17608        x: 0.0_f32,
17609        y: 0.0_f32,
17610        z: 0.0_f32,
17611        roll: 0.0_f32,
17612        pitch: 0.0_f32,
17613        yaw: 0.0_f32,
17614    };
17615    #[cfg(feature = "arbitrary")]
17616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17617        use arbitrary::{Arbitrary, Unstructured};
17618        let mut buf = [0u8; 1024];
17619        rng.fill_bytes(&mut buf);
17620        let mut unstructured = Unstructured::new(&buf);
17621        Self::arbitrary(&mut unstructured).unwrap_or_default()
17622    }
17623}
17624impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17625    fn default() -> Self {
17626        Self::DEFAULT.clone()
17627    }
17628}
17629impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17630    type Message = MavMessage;
17631    const ID: u32 = 89u32;
17632    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17633    const EXTRA_CRC: u8 = 231u8;
17634    const ENCODED_LEN: usize = 28usize;
17635    fn deser(
17636        _version: MavlinkVersion,
17637        __input: &[u8],
17638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17639        let avail_len = __input.len();
17640        let mut payload_buf = [0; Self::ENCODED_LEN];
17641        let mut buf = if avail_len < Self::ENCODED_LEN {
17642            payload_buf[0..avail_len].copy_from_slice(__input);
17643            Bytes::new(&payload_buf)
17644        } else {
17645            Bytes::new(__input)
17646        };
17647        let mut __struct = Self::default();
17648        __struct.time_boot_ms = buf.get_u32_le();
17649        __struct.x = buf.get_f32_le();
17650        __struct.y = buf.get_f32_le();
17651        __struct.z = buf.get_f32_le();
17652        __struct.roll = buf.get_f32_le();
17653        __struct.pitch = buf.get_f32_le();
17654        __struct.yaw = buf.get_f32_le();
17655        Ok(__struct)
17656    }
17657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17658        let mut __tmp = BytesMut::new(bytes);
17659        #[allow(clippy::absurd_extreme_comparisons)]
17660        #[allow(unused_comparisons)]
17661        if __tmp.remaining() < Self::ENCODED_LEN {
17662            panic!(
17663                "buffer is too small (need {} bytes, but got {})",
17664                Self::ENCODED_LEN,
17665                __tmp.remaining(),
17666            )
17667        }
17668        __tmp.put_u32_le(self.time_boot_ms);
17669        __tmp.put_f32_le(self.x);
17670        __tmp.put_f32_le(self.y);
17671        __tmp.put_f32_le(self.z);
17672        __tmp.put_f32_le(self.roll);
17673        __tmp.put_f32_le(self.pitch);
17674        __tmp.put_f32_le(self.yaw);
17675        if matches!(version, MavlinkVersion::V2) {
17676            let len = __tmp.len();
17677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17678        } else {
17679            __tmp.len()
17680        }
17681    }
17682}
17683#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17684#[doc = ""]
17685#[doc = "ID: 268"]
17686#[derive(Debug, Clone, PartialEq)]
17687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17689#[cfg_attr(feature = "ts", derive(TS))]
17690#[cfg_attr(feature = "ts", ts(export))]
17691pub struct LOGGING_ACK_DATA {
17692    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17693    pub sequence: u16,
17694    #[doc = "system ID of the target"]
17695    pub target_system: u8,
17696    #[doc = "component ID of the target"]
17697    pub target_component: u8,
17698}
17699impl LOGGING_ACK_DATA {
17700    pub const ENCODED_LEN: usize = 4usize;
17701    pub const DEFAULT: Self = Self {
17702        sequence: 0_u16,
17703        target_system: 0_u8,
17704        target_component: 0_u8,
17705    };
17706    #[cfg(feature = "arbitrary")]
17707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17708        use arbitrary::{Arbitrary, Unstructured};
17709        let mut buf = [0u8; 1024];
17710        rng.fill_bytes(&mut buf);
17711        let mut unstructured = Unstructured::new(&buf);
17712        Self::arbitrary(&mut unstructured).unwrap_or_default()
17713    }
17714}
17715impl Default for LOGGING_ACK_DATA {
17716    fn default() -> Self {
17717        Self::DEFAULT.clone()
17718    }
17719}
17720impl MessageData for LOGGING_ACK_DATA {
17721    type Message = MavMessage;
17722    const ID: u32 = 268u32;
17723    const NAME: &'static str = "LOGGING_ACK";
17724    const EXTRA_CRC: u8 = 14u8;
17725    const ENCODED_LEN: usize = 4usize;
17726    fn deser(
17727        _version: MavlinkVersion,
17728        __input: &[u8],
17729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17730        let avail_len = __input.len();
17731        let mut payload_buf = [0; Self::ENCODED_LEN];
17732        let mut buf = if avail_len < Self::ENCODED_LEN {
17733            payload_buf[0..avail_len].copy_from_slice(__input);
17734            Bytes::new(&payload_buf)
17735        } else {
17736            Bytes::new(__input)
17737        };
17738        let mut __struct = Self::default();
17739        __struct.sequence = buf.get_u16_le();
17740        __struct.target_system = buf.get_u8();
17741        __struct.target_component = buf.get_u8();
17742        Ok(__struct)
17743    }
17744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17745        let mut __tmp = BytesMut::new(bytes);
17746        #[allow(clippy::absurd_extreme_comparisons)]
17747        #[allow(unused_comparisons)]
17748        if __tmp.remaining() < Self::ENCODED_LEN {
17749            panic!(
17750                "buffer is too small (need {} bytes, but got {})",
17751                Self::ENCODED_LEN,
17752                __tmp.remaining(),
17753            )
17754        }
17755        __tmp.put_u16_le(self.sequence);
17756        __tmp.put_u8(self.target_system);
17757        __tmp.put_u8(self.target_component);
17758        if matches!(version, MavlinkVersion::V2) {
17759            let len = __tmp.len();
17760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17761        } else {
17762            __tmp.len()
17763        }
17764    }
17765}
17766#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17767#[doc = ""]
17768#[doc = "ID: 266"]
17769#[derive(Debug, Clone, PartialEq)]
17770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17772#[cfg_attr(feature = "ts", derive(TS))]
17773#[cfg_attr(feature = "ts", ts(export))]
17774pub struct LOGGING_DATA_DATA {
17775    #[doc = "sequence number (can wrap)"]
17776    pub sequence: u16,
17777    #[doc = "system ID of the target"]
17778    pub target_system: u8,
17779    #[doc = "component ID of the target"]
17780    pub target_component: u8,
17781    #[doc = "data length"]
17782    pub length: u8,
17783    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17784    pub first_message_offset: u8,
17785    #[doc = "logged data"]
17786    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17787    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17788    pub data: [u8; 249],
17789}
17790impl LOGGING_DATA_DATA {
17791    pub const ENCODED_LEN: usize = 255usize;
17792    pub const DEFAULT: Self = Self {
17793        sequence: 0_u16,
17794        target_system: 0_u8,
17795        target_component: 0_u8,
17796        length: 0_u8,
17797        first_message_offset: 0_u8,
17798        data: [0_u8; 249usize],
17799    };
17800    #[cfg(feature = "arbitrary")]
17801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17802        use arbitrary::{Arbitrary, Unstructured};
17803        let mut buf = [0u8; 1024];
17804        rng.fill_bytes(&mut buf);
17805        let mut unstructured = Unstructured::new(&buf);
17806        Self::arbitrary(&mut unstructured).unwrap_or_default()
17807    }
17808}
17809impl Default for LOGGING_DATA_DATA {
17810    fn default() -> Self {
17811        Self::DEFAULT.clone()
17812    }
17813}
17814impl MessageData for LOGGING_DATA_DATA {
17815    type Message = MavMessage;
17816    const ID: u32 = 266u32;
17817    const NAME: &'static str = "LOGGING_DATA";
17818    const EXTRA_CRC: u8 = 193u8;
17819    const ENCODED_LEN: usize = 255usize;
17820    fn deser(
17821        _version: MavlinkVersion,
17822        __input: &[u8],
17823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17824        let avail_len = __input.len();
17825        let mut payload_buf = [0; Self::ENCODED_LEN];
17826        let mut buf = if avail_len < Self::ENCODED_LEN {
17827            payload_buf[0..avail_len].copy_from_slice(__input);
17828            Bytes::new(&payload_buf)
17829        } else {
17830            Bytes::new(__input)
17831        };
17832        let mut __struct = Self::default();
17833        __struct.sequence = buf.get_u16_le();
17834        __struct.target_system = buf.get_u8();
17835        __struct.target_component = buf.get_u8();
17836        __struct.length = buf.get_u8();
17837        __struct.first_message_offset = buf.get_u8();
17838        for v in &mut __struct.data {
17839            let val = buf.get_u8();
17840            *v = val;
17841        }
17842        Ok(__struct)
17843    }
17844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17845        let mut __tmp = BytesMut::new(bytes);
17846        #[allow(clippy::absurd_extreme_comparisons)]
17847        #[allow(unused_comparisons)]
17848        if __tmp.remaining() < Self::ENCODED_LEN {
17849            panic!(
17850                "buffer is too small (need {} bytes, but got {})",
17851                Self::ENCODED_LEN,
17852                __tmp.remaining(),
17853            )
17854        }
17855        __tmp.put_u16_le(self.sequence);
17856        __tmp.put_u8(self.target_system);
17857        __tmp.put_u8(self.target_component);
17858        __tmp.put_u8(self.length);
17859        __tmp.put_u8(self.first_message_offset);
17860        for val in &self.data {
17861            __tmp.put_u8(*val);
17862        }
17863        if matches!(version, MavlinkVersion::V2) {
17864            let len = __tmp.len();
17865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17866        } else {
17867            __tmp.len()
17868        }
17869    }
17870}
17871#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17872#[doc = ""]
17873#[doc = "ID: 267"]
17874#[derive(Debug, Clone, PartialEq)]
17875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17877#[cfg_attr(feature = "ts", derive(TS))]
17878#[cfg_attr(feature = "ts", ts(export))]
17879pub struct LOGGING_DATA_ACKED_DATA {
17880    #[doc = "sequence number (can wrap)"]
17881    pub sequence: u16,
17882    #[doc = "system ID of the target"]
17883    pub target_system: u8,
17884    #[doc = "component ID of the target"]
17885    pub target_component: u8,
17886    #[doc = "data length"]
17887    pub length: u8,
17888    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17889    pub first_message_offset: u8,
17890    #[doc = "logged data"]
17891    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17892    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17893    pub data: [u8; 249],
17894}
17895impl LOGGING_DATA_ACKED_DATA {
17896    pub const ENCODED_LEN: usize = 255usize;
17897    pub const DEFAULT: Self = Self {
17898        sequence: 0_u16,
17899        target_system: 0_u8,
17900        target_component: 0_u8,
17901        length: 0_u8,
17902        first_message_offset: 0_u8,
17903        data: [0_u8; 249usize],
17904    };
17905    #[cfg(feature = "arbitrary")]
17906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17907        use arbitrary::{Arbitrary, Unstructured};
17908        let mut buf = [0u8; 1024];
17909        rng.fill_bytes(&mut buf);
17910        let mut unstructured = Unstructured::new(&buf);
17911        Self::arbitrary(&mut unstructured).unwrap_or_default()
17912    }
17913}
17914impl Default for LOGGING_DATA_ACKED_DATA {
17915    fn default() -> Self {
17916        Self::DEFAULT.clone()
17917    }
17918}
17919impl MessageData for LOGGING_DATA_ACKED_DATA {
17920    type Message = MavMessage;
17921    const ID: u32 = 267u32;
17922    const NAME: &'static str = "LOGGING_DATA_ACKED";
17923    const EXTRA_CRC: u8 = 35u8;
17924    const ENCODED_LEN: usize = 255usize;
17925    fn deser(
17926        _version: MavlinkVersion,
17927        __input: &[u8],
17928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17929        let avail_len = __input.len();
17930        let mut payload_buf = [0; Self::ENCODED_LEN];
17931        let mut buf = if avail_len < Self::ENCODED_LEN {
17932            payload_buf[0..avail_len].copy_from_slice(__input);
17933            Bytes::new(&payload_buf)
17934        } else {
17935            Bytes::new(__input)
17936        };
17937        let mut __struct = Self::default();
17938        __struct.sequence = buf.get_u16_le();
17939        __struct.target_system = buf.get_u8();
17940        __struct.target_component = buf.get_u8();
17941        __struct.length = buf.get_u8();
17942        __struct.first_message_offset = buf.get_u8();
17943        for v in &mut __struct.data {
17944            let val = buf.get_u8();
17945            *v = val;
17946        }
17947        Ok(__struct)
17948    }
17949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17950        let mut __tmp = BytesMut::new(bytes);
17951        #[allow(clippy::absurd_extreme_comparisons)]
17952        #[allow(unused_comparisons)]
17953        if __tmp.remaining() < Self::ENCODED_LEN {
17954            panic!(
17955                "buffer is too small (need {} bytes, but got {})",
17956                Self::ENCODED_LEN,
17957                __tmp.remaining(),
17958            )
17959        }
17960        __tmp.put_u16_le(self.sequence);
17961        __tmp.put_u8(self.target_system);
17962        __tmp.put_u8(self.target_component);
17963        __tmp.put_u8(self.length);
17964        __tmp.put_u8(self.first_message_offset);
17965        for val in &self.data {
17966            __tmp.put_u8(*val);
17967        }
17968        if matches!(version, MavlinkVersion::V2) {
17969            let len = __tmp.len();
17970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17971        } else {
17972            __tmp.len()
17973        }
17974    }
17975}
17976#[doc = "Reply to LOG_REQUEST_DATA."]
17977#[doc = ""]
17978#[doc = "ID: 120"]
17979#[derive(Debug, Clone, PartialEq)]
17980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17982#[cfg_attr(feature = "ts", derive(TS))]
17983#[cfg_attr(feature = "ts", ts(export))]
17984pub struct LOG_DATA_DATA {
17985    #[doc = "Offset into the log"]
17986    pub ofs: u32,
17987    #[doc = "Log id (from LOG_ENTRY reply)"]
17988    pub id: u16,
17989    #[doc = "Number of bytes (zero for end of log)"]
17990    pub count: u8,
17991    #[doc = "log data"]
17992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17994    pub data: [u8; 90],
17995}
17996impl LOG_DATA_DATA {
17997    pub const ENCODED_LEN: usize = 97usize;
17998    pub const DEFAULT: Self = Self {
17999        ofs: 0_u32,
18000        id: 0_u16,
18001        count: 0_u8,
18002        data: [0_u8; 90usize],
18003    };
18004    #[cfg(feature = "arbitrary")]
18005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18006        use arbitrary::{Arbitrary, Unstructured};
18007        let mut buf = [0u8; 1024];
18008        rng.fill_bytes(&mut buf);
18009        let mut unstructured = Unstructured::new(&buf);
18010        Self::arbitrary(&mut unstructured).unwrap_or_default()
18011    }
18012}
18013impl Default for LOG_DATA_DATA {
18014    fn default() -> Self {
18015        Self::DEFAULT.clone()
18016    }
18017}
18018impl MessageData for LOG_DATA_DATA {
18019    type Message = MavMessage;
18020    const ID: u32 = 120u32;
18021    const NAME: &'static str = "LOG_DATA";
18022    const EXTRA_CRC: u8 = 134u8;
18023    const ENCODED_LEN: usize = 97usize;
18024    fn deser(
18025        _version: MavlinkVersion,
18026        __input: &[u8],
18027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18028        let avail_len = __input.len();
18029        let mut payload_buf = [0; Self::ENCODED_LEN];
18030        let mut buf = if avail_len < Self::ENCODED_LEN {
18031            payload_buf[0..avail_len].copy_from_slice(__input);
18032            Bytes::new(&payload_buf)
18033        } else {
18034            Bytes::new(__input)
18035        };
18036        let mut __struct = Self::default();
18037        __struct.ofs = buf.get_u32_le();
18038        __struct.id = buf.get_u16_le();
18039        __struct.count = buf.get_u8();
18040        for v in &mut __struct.data {
18041            let val = buf.get_u8();
18042            *v = val;
18043        }
18044        Ok(__struct)
18045    }
18046    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18047        let mut __tmp = BytesMut::new(bytes);
18048        #[allow(clippy::absurd_extreme_comparisons)]
18049        #[allow(unused_comparisons)]
18050        if __tmp.remaining() < Self::ENCODED_LEN {
18051            panic!(
18052                "buffer is too small (need {} bytes, but got {})",
18053                Self::ENCODED_LEN,
18054                __tmp.remaining(),
18055            )
18056        }
18057        __tmp.put_u32_le(self.ofs);
18058        __tmp.put_u16_le(self.id);
18059        __tmp.put_u8(self.count);
18060        for val in &self.data {
18061            __tmp.put_u8(*val);
18062        }
18063        if matches!(version, MavlinkVersion::V2) {
18064            let len = __tmp.len();
18065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18066        } else {
18067            __tmp.len()
18068        }
18069    }
18070}
18071#[doc = "Reply to LOG_REQUEST_LIST."]
18072#[doc = ""]
18073#[doc = "ID: 118"]
18074#[derive(Debug, Clone, PartialEq)]
18075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18077#[cfg_attr(feature = "ts", derive(TS))]
18078#[cfg_attr(feature = "ts", ts(export))]
18079pub struct LOG_ENTRY_DATA {
18080    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18081    pub time_utc: u32,
18082    #[doc = "Size of the log (may be approximate)"]
18083    pub size: u32,
18084    #[doc = "Log id"]
18085    pub id: u16,
18086    #[doc = "Total number of logs"]
18087    pub num_logs: u16,
18088    #[doc = "High log number"]
18089    pub last_log_num: u16,
18090}
18091impl LOG_ENTRY_DATA {
18092    pub const ENCODED_LEN: usize = 14usize;
18093    pub const DEFAULT: Self = Self {
18094        time_utc: 0_u32,
18095        size: 0_u32,
18096        id: 0_u16,
18097        num_logs: 0_u16,
18098        last_log_num: 0_u16,
18099    };
18100    #[cfg(feature = "arbitrary")]
18101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18102        use arbitrary::{Arbitrary, Unstructured};
18103        let mut buf = [0u8; 1024];
18104        rng.fill_bytes(&mut buf);
18105        let mut unstructured = Unstructured::new(&buf);
18106        Self::arbitrary(&mut unstructured).unwrap_or_default()
18107    }
18108}
18109impl Default for LOG_ENTRY_DATA {
18110    fn default() -> Self {
18111        Self::DEFAULT.clone()
18112    }
18113}
18114impl MessageData for LOG_ENTRY_DATA {
18115    type Message = MavMessage;
18116    const ID: u32 = 118u32;
18117    const NAME: &'static str = "LOG_ENTRY";
18118    const EXTRA_CRC: u8 = 56u8;
18119    const ENCODED_LEN: usize = 14usize;
18120    fn deser(
18121        _version: MavlinkVersion,
18122        __input: &[u8],
18123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18124        let avail_len = __input.len();
18125        let mut payload_buf = [0; Self::ENCODED_LEN];
18126        let mut buf = if avail_len < Self::ENCODED_LEN {
18127            payload_buf[0..avail_len].copy_from_slice(__input);
18128            Bytes::new(&payload_buf)
18129        } else {
18130            Bytes::new(__input)
18131        };
18132        let mut __struct = Self::default();
18133        __struct.time_utc = buf.get_u32_le();
18134        __struct.size = buf.get_u32_le();
18135        __struct.id = buf.get_u16_le();
18136        __struct.num_logs = buf.get_u16_le();
18137        __struct.last_log_num = buf.get_u16_le();
18138        Ok(__struct)
18139    }
18140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18141        let mut __tmp = BytesMut::new(bytes);
18142        #[allow(clippy::absurd_extreme_comparisons)]
18143        #[allow(unused_comparisons)]
18144        if __tmp.remaining() < Self::ENCODED_LEN {
18145            panic!(
18146                "buffer is too small (need {} bytes, but got {})",
18147                Self::ENCODED_LEN,
18148                __tmp.remaining(),
18149            )
18150        }
18151        __tmp.put_u32_le(self.time_utc);
18152        __tmp.put_u32_le(self.size);
18153        __tmp.put_u16_le(self.id);
18154        __tmp.put_u16_le(self.num_logs);
18155        __tmp.put_u16_le(self.last_log_num);
18156        if matches!(version, MavlinkVersion::V2) {
18157            let len = __tmp.len();
18158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18159        } else {
18160            __tmp.len()
18161        }
18162    }
18163}
18164#[doc = "Erase all logs."]
18165#[doc = ""]
18166#[doc = "ID: 121"]
18167#[derive(Debug, Clone, PartialEq)]
18168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18170#[cfg_attr(feature = "ts", derive(TS))]
18171#[cfg_attr(feature = "ts", ts(export))]
18172pub struct LOG_ERASE_DATA {
18173    #[doc = "System ID"]
18174    pub target_system: u8,
18175    #[doc = "Component ID"]
18176    pub target_component: u8,
18177}
18178impl LOG_ERASE_DATA {
18179    pub const ENCODED_LEN: usize = 2usize;
18180    pub const DEFAULT: Self = Self {
18181        target_system: 0_u8,
18182        target_component: 0_u8,
18183    };
18184    #[cfg(feature = "arbitrary")]
18185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18186        use arbitrary::{Arbitrary, Unstructured};
18187        let mut buf = [0u8; 1024];
18188        rng.fill_bytes(&mut buf);
18189        let mut unstructured = Unstructured::new(&buf);
18190        Self::arbitrary(&mut unstructured).unwrap_or_default()
18191    }
18192}
18193impl Default for LOG_ERASE_DATA {
18194    fn default() -> Self {
18195        Self::DEFAULT.clone()
18196    }
18197}
18198impl MessageData for LOG_ERASE_DATA {
18199    type Message = MavMessage;
18200    const ID: u32 = 121u32;
18201    const NAME: &'static str = "LOG_ERASE";
18202    const EXTRA_CRC: u8 = 237u8;
18203    const ENCODED_LEN: usize = 2usize;
18204    fn deser(
18205        _version: MavlinkVersion,
18206        __input: &[u8],
18207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18208        let avail_len = __input.len();
18209        let mut payload_buf = [0; Self::ENCODED_LEN];
18210        let mut buf = if avail_len < Self::ENCODED_LEN {
18211            payload_buf[0..avail_len].copy_from_slice(__input);
18212            Bytes::new(&payload_buf)
18213        } else {
18214            Bytes::new(__input)
18215        };
18216        let mut __struct = Self::default();
18217        __struct.target_system = buf.get_u8();
18218        __struct.target_component = buf.get_u8();
18219        Ok(__struct)
18220    }
18221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18222        let mut __tmp = BytesMut::new(bytes);
18223        #[allow(clippy::absurd_extreme_comparisons)]
18224        #[allow(unused_comparisons)]
18225        if __tmp.remaining() < Self::ENCODED_LEN {
18226            panic!(
18227                "buffer is too small (need {} bytes, but got {})",
18228                Self::ENCODED_LEN,
18229                __tmp.remaining(),
18230            )
18231        }
18232        __tmp.put_u8(self.target_system);
18233        __tmp.put_u8(self.target_component);
18234        if matches!(version, MavlinkVersion::V2) {
18235            let len = __tmp.len();
18236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18237        } else {
18238            __tmp.len()
18239        }
18240    }
18241}
18242#[doc = "Request a chunk of a log."]
18243#[doc = ""]
18244#[doc = "ID: 119"]
18245#[derive(Debug, Clone, PartialEq)]
18246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18248#[cfg_attr(feature = "ts", derive(TS))]
18249#[cfg_attr(feature = "ts", ts(export))]
18250pub struct LOG_REQUEST_DATA_DATA {
18251    #[doc = "Offset into the log"]
18252    pub ofs: u32,
18253    #[doc = "Number of bytes"]
18254    pub count: u32,
18255    #[doc = "Log id (from LOG_ENTRY reply)"]
18256    pub id: u16,
18257    #[doc = "System ID"]
18258    pub target_system: u8,
18259    #[doc = "Component ID"]
18260    pub target_component: u8,
18261}
18262impl LOG_REQUEST_DATA_DATA {
18263    pub const ENCODED_LEN: usize = 12usize;
18264    pub const DEFAULT: Self = Self {
18265        ofs: 0_u32,
18266        count: 0_u32,
18267        id: 0_u16,
18268        target_system: 0_u8,
18269        target_component: 0_u8,
18270    };
18271    #[cfg(feature = "arbitrary")]
18272    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18273        use arbitrary::{Arbitrary, Unstructured};
18274        let mut buf = [0u8; 1024];
18275        rng.fill_bytes(&mut buf);
18276        let mut unstructured = Unstructured::new(&buf);
18277        Self::arbitrary(&mut unstructured).unwrap_or_default()
18278    }
18279}
18280impl Default for LOG_REQUEST_DATA_DATA {
18281    fn default() -> Self {
18282        Self::DEFAULT.clone()
18283    }
18284}
18285impl MessageData for LOG_REQUEST_DATA_DATA {
18286    type Message = MavMessage;
18287    const ID: u32 = 119u32;
18288    const NAME: &'static str = "LOG_REQUEST_DATA";
18289    const EXTRA_CRC: u8 = 116u8;
18290    const ENCODED_LEN: usize = 12usize;
18291    fn deser(
18292        _version: MavlinkVersion,
18293        __input: &[u8],
18294    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18295        let avail_len = __input.len();
18296        let mut payload_buf = [0; Self::ENCODED_LEN];
18297        let mut buf = if avail_len < Self::ENCODED_LEN {
18298            payload_buf[0..avail_len].copy_from_slice(__input);
18299            Bytes::new(&payload_buf)
18300        } else {
18301            Bytes::new(__input)
18302        };
18303        let mut __struct = Self::default();
18304        __struct.ofs = buf.get_u32_le();
18305        __struct.count = buf.get_u32_le();
18306        __struct.id = buf.get_u16_le();
18307        __struct.target_system = buf.get_u8();
18308        __struct.target_component = buf.get_u8();
18309        Ok(__struct)
18310    }
18311    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18312        let mut __tmp = BytesMut::new(bytes);
18313        #[allow(clippy::absurd_extreme_comparisons)]
18314        #[allow(unused_comparisons)]
18315        if __tmp.remaining() < Self::ENCODED_LEN {
18316            panic!(
18317                "buffer is too small (need {} bytes, but got {})",
18318                Self::ENCODED_LEN,
18319                __tmp.remaining(),
18320            )
18321        }
18322        __tmp.put_u32_le(self.ofs);
18323        __tmp.put_u32_le(self.count);
18324        __tmp.put_u16_le(self.id);
18325        __tmp.put_u8(self.target_system);
18326        __tmp.put_u8(self.target_component);
18327        if matches!(version, MavlinkVersion::V2) {
18328            let len = __tmp.len();
18329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18330        } else {
18331            __tmp.len()
18332        }
18333    }
18334}
18335#[doc = "Stop log transfer and resume normal logging."]
18336#[doc = ""]
18337#[doc = "ID: 122"]
18338#[derive(Debug, Clone, PartialEq)]
18339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18341#[cfg_attr(feature = "ts", derive(TS))]
18342#[cfg_attr(feature = "ts", ts(export))]
18343pub struct LOG_REQUEST_END_DATA {
18344    #[doc = "System ID"]
18345    pub target_system: u8,
18346    #[doc = "Component ID"]
18347    pub target_component: u8,
18348}
18349impl LOG_REQUEST_END_DATA {
18350    pub const ENCODED_LEN: usize = 2usize;
18351    pub const DEFAULT: Self = Self {
18352        target_system: 0_u8,
18353        target_component: 0_u8,
18354    };
18355    #[cfg(feature = "arbitrary")]
18356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18357        use arbitrary::{Arbitrary, Unstructured};
18358        let mut buf = [0u8; 1024];
18359        rng.fill_bytes(&mut buf);
18360        let mut unstructured = Unstructured::new(&buf);
18361        Self::arbitrary(&mut unstructured).unwrap_or_default()
18362    }
18363}
18364impl Default for LOG_REQUEST_END_DATA {
18365    fn default() -> Self {
18366        Self::DEFAULT.clone()
18367    }
18368}
18369impl MessageData for LOG_REQUEST_END_DATA {
18370    type Message = MavMessage;
18371    const ID: u32 = 122u32;
18372    const NAME: &'static str = "LOG_REQUEST_END";
18373    const EXTRA_CRC: u8 = 203u8;
18374    const ENCODED_LEN: usize = 2usize;
18375    fn deser(
18376        _version: MavlinkVersion,
18377        __input: &[u8],
18378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18379        let avail_len = __input.len();
18380        let mut payload_buf = [0; Self::ENCODED_LEN];
18381        let mut buf = if avail_len < Self::ENCODED_LEN {
18382            payload_buf[0..avail_len].copy_from_slice(__input);
18383            Bytes::new(&payload_buf)
18384        } else {
18385            Bytes::new(__input)
18386        };
18387        let mut __struct = Self::default();
18388        __struct.target_system = buf.get_u8();
18389        __struct.target_component = buf.get_u8();
18390        Ok(__struct)
18391    }
18392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18393        let mut __tmp = BytesMut::new(bytes);
18394        #[allow(clippy::absurd_extreme_comparisons)]
18395        #[allow(unused_comparisons)]
18396        if __tmp.remaining() < Self::ENCODED_LEN {
18397            panic!(
18398                "buffer is too small (need {} bytes, but got {})",
18399                Self::ENCODED_LEN,
18400                __tmp.remaining(),
18401            )
18402        }
18403        __tmp.put_u8(self.target_system);
18404        __tmp.put_u8(self.target_component);
18405        if matches!(version, MavlinkVersion::V2) {
18406            let len = __tmp.len();
18407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18408        } else {
18409            __tmp.len()
18410        }
18411    }
18412}
18413#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18414#[doc = ""]
18415#[doc = "ID: 117"]
18416#[derive(Debug, Clone, PartialEq)]
18417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18419#[cfg_attr(feature = "ts", derive(TS))]
18420#[cfg_attr(feature = "ts", ts(export))]
18421pub struct LOG_REQUEST_LIST_DATA {
18422    #[doc = "First log id (0 for first available)"]
18423    pub start: u16,
18424    #[doc = "Last log id (0xffff for last available)"]
18425    pub end: u16,
18426    #[doc = "System ID"]
18427    pub target_system: u8,
18428    #[doc = "Component ID"]
18429    pub target_component: u8,
18430}
18431impl LOG_REQUEST_LIST_DATA {
18432    pub const ENCODED_LEN: usize = 6usize;
18433    pub const DEFAULT: Self = Self {
18434        start: 0_u16,
18435        end: 0_u16,
18436        target_system: 0_u8,
18437        target_component: 0_u8,
18438    };
18439    #[cfg(feature = "arbitrary")]
18440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18441        use arbitrary::{Arbitrary, Unstructured};
18442        let mut buf = [0u8; 1024];
18443        rng.fill_bytes(&mut buf);
18444        let mut unstructured = Unstructured::new(&buf);
18445        Self::arbitrary(&mut unstructured).unwrap_or_default()
18446    }
18447}
18448impl Default for LOG_REQUEST_LIST_DATA {
18449    fn default() -> Self {
18450        Self::DEFAULT.clone()
18451    }
18452}
18453impl MessageData for LOG_REQUEST_LIST_DATA {
18454    type Message = MavMessage;
18455    const ID: u32 = 117u32;
18456    const NAME: &'static str = "LOG_REQUEST_LIST";
18457    const EXTRA_CRC: u8 = 128u8;
18458    const ENCODED_LEN: usize = 6usize;
18459    fn deser(
18460        _version: MavlinkVersion,
18461        __input: &[u8],
18462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18463        let avail_len = __input.len();
18464        let mut payload_buf = [0; Self::ENCODED_LEN];
18465        let mut buf = if avail_len < Self::ENCODED_LEN {
18466            payload_buf[0..avail_len].copy_from_slice(__input);
18467            Bytes::new(&payload_buf)
18468        } else {
18469            Bytes::new(__input)
18470        };
18471        let mut __struct = Self::default();
18472        __struct.start = buf.get_u16_le();
18473        __struct.end = buf.get_u16_le();
18474        __struct.target_system = buf.get_u8();
18475        __struct.target_component = buf.get_u8();
18476        Ok(__struct)
18477    }
18478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18479        let mut __tmp = BytesMut::new(bytes);
18480        #[allow(clippy::absurd_extreme_comparisons)]
18481        #[allow(unused_comparisons)]
18482        if __tmp.remaining() < Self::ENCODED_LEN {
18483            panic!(
18484                "buffer is too small (need {} bytes, but got {})",
18485                Self::ENCODED_LEN,
18486                __tmp.remaining(),
18487            )
18488        }
18489        __tmp.put_u16_le(self.start);
18490        __tmp.put_u16_le(self.end);
18491        __tmp.put_u8(self.target_system);
18492        __tmp.put_u8(self.target_component);
18493        if matches!(version, MavlinkVersion::V2) {
18494            let len = __tmp.len();
18495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18496        } else {
18497            __tmp.len()
18498        }
18499    }
18500}
18501#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18502#[doc = ""]
18503#[doc = "ID: 192"]
18504#[derive(Debug, Clone, PartialEq)]
18505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18507#[cfg_attr(feature = "ts", derive(TS))]
18508#[cfg_attr(feature = "ts", ts(export))]
18509pub struct MAG_CAL_REPORT_DATA {
18510    #[doc = "RMS milligauss residuals."]
18511    pub fitness: f32,
18512    #[doc = "X offset."]
18513    pub ofs_x: f32,
18514    #[doc = "Y offset."]
18515    pub ofs_y: f32,
18516    #[doc = "Z offset."]
18517    pub ofs_z: f32,
18518    #[doc = "X diagonal (matrix 11)."]
18519    pub diag_x: f32,
18520    #[doc = "Y diagonal (matrix 22)."]
18521    pub diag_y: f32,
18522    #[doc = "Z diagonal (matrix 33)."]
18523    pub diag_z: f32,
18524    #[doc = "X off-diagonal (matrix 12 and 21)."]
18525    pub offdiag_x: f32,
18526    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18527    pub offdiag_y: f32,
18528    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18529    pub offdiag_z: f32,
18530    #[doc = "Compass being calibrated."]
18531    pub compass_id: u8,
18532    #[doc = "Bitmask of compasses being calibrated."]
18533    pub cal_mask: u8,
18534    #[doc = "Calibration Status."]
18535    pub cal_status: MagCalStatus,
18536    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18537    pub autosaved: u8,
18538    #[doc = "Confidence in orientation (higher is better)."]
18539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18540    pub orientation_confidence: f32,
18541    #[doc = "orientation before calibration."]
18542    #[cfg_attr(feature = "serde", serde(default))]
18543    pub old_orientation: MavSensorOrientation,
18544    #[doc = "orientation after calibration."]
18545    #[cfg_attr(feature = "serde", serde(default))]
18546    pub new_orientation: MavSensorOrientation,
18547    #[doc = "field radius correction factor"]
18548    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18549    pub scale_factor: f32,
18550}
18551impl MAG_CAL_REPORT_DATA {
18552    pub const ENCODED_LEN: usize = 54usize;
18553    pub const DEFAULT: Self = Self {
18554        fitness: 0.0_f32,
18555        ofs_x: 0.0_f32,
18556        ofs_y: 0.0_f32,
18557        ofs_z: 0.0_f32,
18558        diag_x: 0.0_f32,
18559        diag_y: 0.0_f32,
18560        diag_z: 0.0_f32,
18561        offdiag_x: 0.0_f32,
18562        offdiag_y: 0.0_f32,
18563        offdiag_z: 0.0_f32,
18564        compass_id: 0_u8,
18565        cal_mask: 0_u8,
18566        cal_status: MagCalStatus::DEFAULT,
18567        autosaved: 0_u8,
18568        orientation_confidence: 0.0_f32,
18569        old_orientation: MavSensorOrientation::DEFAULT,
18570        new_orientation: MavSensorOrientation::DEFAULT,
18571        scale_factor: 0.0_f32,
18572    };
18573    #[cfg(feature = "arbitrary")]
18574    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18575        use arbitrary::{Arbitrary, Unstructured};
18576        let mut buf = [0u8; 1024];
18577        rng.fill_bytes(&mut buf);
18578        let mut unstructured = Unstructured::new(&buf);
18579        Self::arbitrary(&mut unstructured).unwrap_or_default()
18580    }
18581}
18582impl Default for MAG_CAL_REPORT_DATA {
18583    fn default() -> Self {
18584        Self::DEFAULT.clone()
18585    }
18586}
18587impl MessageData for MAG_CAL_REPORT_DATA {
18588    type Message = MavMessage;
18589    const ID: u32 = 192u32;
18590    const NAME: &'static str = "MAG_CAL_REPORT";
18591    const EXTRA_CRC: u8 = 36u8;
18592    const ENCODED_LEN: usize = 54usize;
18593    fn deser(
18594        _version: MavlinkVersion,
18595        __input: &[u8],
18596    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18597        let avail_len = __input.len();
18598        let mut payload_buf = [0; Self::ENCODED_LEN];
18599        let mut buf = if avail_len < Self::ENCODED_LEN {
18600            payload_buf[0..avail_len].copy_from_slice(__input);
18601            Bytes::new(&payload_buf)
18602        } else {
18603            Bytes::new(__input)
18604        };
18605        let mut __struct = Self::default();
18606        __struct.fitness = buf.get_f32_le();
18607        __struct.ofs_x = buf.get_f32_le();
18608        __struct.ofs_y = buf.get_f32_le();
18609        __struct.ofs_z = buf.get_f32_le();
18610        __struct.diag_x = buf.get_f32_le();
18611        __struct.diag_y = buf.get_f32_le();
18612        __struct.diag_z = buf.get_f32_le();
18613        __struct.offdiag_x = buf.get_f32_le();
18614        __struct.offdiag_y = buf.get_f32_le();
18615        __struct.offdiag_z = buf.get_f32_le();
18616        __struct.compass_id = buf.get_u8();
18617        __struct.cal_mask = buf.get_u8();
18618        let tmp = buf.get_u8();
18619        __struct.cal_status =
18620            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18621                enum_type: "MagCalStatus",
18622                value: tmp as u32,
18623            })?;
18624        __struct.autosaved = buf.get_u8();
18625        __struct.orientation_confidence = buf.get_f32_le();
18626        let tmp = buf.get_u8();
18627        __struct.old_orientation =
18628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18629                enum_type: "MavSensorOrientation",
18630                value: tmp as u32,
18631            })?;
18632        let tmp = buf.get_u8();
18633        __struct.new_orientation =
18634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18635                enum_type: "MavSensorOrientation",
18636                value: tmp as u32,
18637            })?;
18638        __struct.scale_factor = buf.get_f32_le();
18639        Ok(__struct)
18640    }
18641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18642        let mut __tmp = BytesMut::new(bytes);
18643        #[allow(clippy::absurd_extreme_comparisons)]
18644        #[allow(unused_comparisons)]
18645        if __tmp.remaining() < Self::ENCODED_LEN {
18646            panic!(
18647                "buffer is too small (need {} bytes, but got {})",
18648                Self::ENCODED_LEN,
18649                __tmp.remaining(),
18650            )
18651        }
18652        __tmp.put_f32_le(self.fitness);
18653        __tmp.put_f32_le(self.ofs_x);
18654        __tmp.put_f32_le(self.ofs_y);
18655        __tmp.put_f32_le(self.ofs_z);
18656        __tmp.put_f32_le(self.diag_x);
18657        __tmp.put_f32_le(self.diag_y);
18658        __tmp.put_f32_le(self.diag_z);
18659        __tmp.put_f32_le(self.offdiag_x);
18660        __tmp.put_f32_le(self.offdiag_y);
18661        __tmp.put_f32_le(self.offdiag_z);
18662        __tmp.put_u8(self.compass_id);
18663        __tmp.put_u8(self.cal_mask);
18664        __tmp.put_u8(self.cal_status as u8);
18665        __tmp.put_u8(self.autosaved);
18666        if matches!(version, MavlinkVersion::V2) {
18667            __tmp.put_f32_le(self.orientation_confidence);
18668            __tmp.put_u8(self.old_orientation as u8);
18669            __tmp.put_u8(self.new_orientation as u8);
18670            __tmp.put_f32_le(self.scale_factor);
18671            let len = __tmp.len();
18672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18673        } else {
18674            __tmp.len()
18675        }
18676    }
18677}
18678#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18679#[doc = ""]
18680#[doc = "ID: 69"]
18681#[derive(Debug, Clone, PartialEq)]
18682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18684#[cfg_attr(feature = "ts", derive(TS))]
18685#[cfg_attr(feature = "ts", ts(export))]
18686pub struct MANUAL_CONTROL_DATA {
18687    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18688    pub x: i16,
18689    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18690    pub y: i16,
18691    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18692    pub z: i16,
18693    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18694    pub r: i16,
18695    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18696    pub buttons: u16,
18697    #[doc = "The system to be controlled."]
18698    pub target: u8,
18699    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18701    pub buttons2: u16,
18702    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18704    pub enabled_extensions: u8,
18705    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18706    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18707    pub s: i16,
18708    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18709    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18710    pub t: i16,
18711    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18712    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18713    pub aux1: i16,
18714    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18715    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18716    pub aux2: i16,
18717    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18718    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18719    pub aux3: i16,
18720    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18722    pub aux4: i16,
18723    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18724    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18725    pub aux5: i16,
18726    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18727    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18728    pub aux6: i16,
18729}
18730impl MANUAL_CONTROL_DATA {
18731    pub const ENCODED_LEN: usize = 30usize;
18732    pub const DEFAULT: Self = Self {
18733        x: 0_i16,
18734        y: 0_i16,
18735        z: 0_i16,
18736        r: 0_i16,
18737        buttons: 0_u16,
18738        target: 0_u8,
18739        buttons2: 0_u16,
18740        enabled_extensions: 0_u8,
18741        s: 0_i16,
18742        t: 0_i16,
18743        aux1: 0_i16,
18744        aux2: 0_i16,
18745        aux3: 0_i16,
18746        aux4: 0_i16,
18747        aux5: 0_i16,
18748        aux6: 0_i16,
18749    };
18750    #[cfg(feature = "arbitrary")]
18751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18752        use arbitrary::{Arbitrary, Unstructured};
18753        let mut buf = [0u8; 1024];
18754        rng.fill_bytes(&mut buf);
18755        let mut unstructured = Unstructured::new(&buf);
18756        Self::arbitrary(&mut unstructured).unwrap_or_default()
18757    }
18758}
18759impl Default for MANUAL_CONTROL_DATA {
18760    fn default() -> Self {
18761        Self::DEFAULT.clone()
18762    }
18763}
18764impl MessageData for MANUAL_CONTROL_DATA {
18765    type Message = MavMessage;
18766    const ID: u32 = 69u32;
18767    const NAME: &'static str = "MANUAL_CONTROL";
18768    const EXTRA_CRC: u8 = 243u8;
18769    const ENCODED_LEN: usize = 30usize;
18770    fn deser(
18771        _version: MavlinkVersion,
18772        __input: &[u8],
18773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18774        let avail_len = __input.len();
18775        let mut payload_buf = [0; Self::ENCODED_LEN];
18776        let mut buf = if avail_len < Self::ENCODED_LEN {
18777            payload_buf[0..avail_len].copy_from_slice(__input);
18778            Bytes::new(&payload_buf)
18779        } else {
18780            Bytes::new(__input)
18781        };
18782        let mut __struct = Self::default();
18783        __struct.x = buf.get_i16_le();
18784        __struct.y = buf.get_i16_le();
18785        __struct.z = buf.get_i16_le();
18786        __struct.r = buf.get_i16_le();
18787        __struct.buttons = buf.get_u16_le();
18788        __struct.target = buf.get_u8();
18789        __struct.buttons2 = buf.get_u16_le();
18790        __struct.enabled_extensions = buf.get_u8();
18791        __struct.s = buf.get_i16_le();
18792        __struct.t = buf.get_i16_le();
18793        __struct.aux1 = buf.get_i16_le();
18794        __struct.aux2 = buf.get_i16_le();
18795        __struct.aux3 = buf.get_i16_le();
18796        __struct.aux4 = buf.get_i16_le();
18797        __struct.aux5 = buf.get_i16_le();
18798        __struct.aux6 = buf.get_i16_le();
18799        Ok(__struct)
18800    }
18801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18802        let mut __tmp = BytesMut::new(bytes);
18803        #[allow(clippy::absurd_extreme_comparisons)]
18804        #[allow(unused_comparisons)]
18805        if __tmp.remaining() < Self::ENCODED_LEN {
18806            panic!(
18807                "buffer is too small (need {} bytes, but got {})",
18808                Self::ENCODED_LEN,
18809                __tmp.remaining(),
18810            )
18811        }
18812        __tmp.put_i16_le(self.x);
18813        __tmp.put_i16_le(self.y);
18814        __tmp.put_i16_le(self.z);
18815        __tmp.put_i16_le(self.r);
18816        __tmp.put_u16_le(self.buttons);
18817        __tmp.put_u8(self.target);
18818        if matches!(version, MavlinkVersion::V2) {
18819            __tmp.put_u16_le(self.buttons2);
18820            __tmp.put_u8(self.enabled_extensions);
18821            __tmp.put_i16_le(self.s);
18822            __tmp.put_i16_le(self.t);
18823            __tmp.put_i16_le(self.aux1);
18824            __tmp.put_i16_le(self.aux2);
18825            __tmp.put_i16_le(self.aux3);
18826            __tmp.put_i16_le(self.aux4);
18827            __tmp.put_i16_le(self.aux5);
18828            __tmp.put_i16_le(self.aux6);
18829            let len = __tmp.len();
18830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18831        } else {
18832            __tmp.len()
18833        }
18834    }
18835}
18836#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18837#[doc = ""]
18838#[doc = "ID: 81"]
18839#[derive(Debug, Clone, PartialEq)]
18840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18842#[cfg_attr(feature = "ts", derive(TS))]
18843#[cfg_attr(feature = "ts", ts(export))]
18844pub struct MANUAL_SETPOINT_DATA {
18845    #[doc = "Timestamp (time since system boot)."]
18846    pub time_boot_ms: u32,
18847    #[doc = "Desired roll rate"]
18848    pub roll: f32,
18849    #[doc = "Desired pitch rate"]
18850    pub pitch: f32,
18851    #[doc = "Desired yaw rate"]
18852    pub yaw: f32,
18853    #[doc = "Collective thrust, normalized to 0 .. 1"]
18854    pub thrust: f32,
18855    #[doc = "Flight mode switch position, 0.. 255"]
18856    pub mode_switch: u8,
18857    #[doc = "Override mode switch position, 0.. 255"]
18858    pub manual_override_switch: u8,
18859}
18860impl MANUAL_SETPOINT_DATA {
18861    pub const ENCODED_LEN: usize = 22usize;
18862    pub const DEFAULT: Self = Self {
18863        time_boot_ms: 0_u32,
18864        roll: 0.0_f32,
18865        pitch: 0.0_f32,
18866        yaw: 0.0_f32,
18867        thrust: 0.0_f32,
18868        mode_switch: 0_u8,
18869        manual_override_switch: 0_u8,
18870    };
18871    #[cfg(feature = "arbitrary")]
18872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18873        use arbitrary::{Arbitrary, Unstructured};
18874        let mut buf = [0u8; 1024];
18875        rng.fill_bytes(&mut buf);
18876        let mut unstructured = Unstructured::new(&buf);
18877        Self::arbitrary(&mut unstructured).unwrap_or_default()
18878    }
18879}
18880impl Default for MANUAL_SETPOINT_DATA {
18881    fn default() -> Self {
18882        Self::DEFAULT.clone()
18883    }
18884}
18885impl MessageData for MANUAL_SETPOINT_DATA {
18886    type Message = MavMessage;
18887    const ID: u32 = 81u32;
18888    const NAME: &'static str = "MANUAL_SETPOINT";
18889    const EXTRA_CRC: u8 = 106u8;
18890    const ENCODED_LEN: usize = 22usize;
18891    fn deser(
18892        _version: MavlinkVersion,
18893        __input: &[u8],
18894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18895        let avail_len = __input.len();
18896        let mut payload_buf = [0; Self::ENCODED_LEN];
18897        let mut buf = if avail_len < Self::ENCODED_LEN {
18898            payload_buf[0..avail_len].copy_from_slice(__input);
18899            Bytes::new(&payload_buf)
18900        } else {
18901            Bytes::new(__input)
18902        };
18903        let mut __struct = Self::default();
18904        __struct.time_boot_ms = buf.get_u32_le();
18905        __struct.roll = buf.get_f32_le();
18906        __struct.pitch = buf.get_f32_le();
18907        __struct.yaw = buf.get_f32_le();
18908        __struct.thrust = buf.get_f32_le();
18909        __struct.mode_switch = buf.get_u8();
18910        __struct.manual_override_switch = buf.get_u8();
18911        Ok(__struct)
18912    }
18913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18914        let mut __tmp = BytesMut::new(bytes);
18915        #[allow(clippy::absurd_extreme_comparisons)]
18916        #[allow(unused_comparisons)]
18917        if __tmp.remaining() < Self::ENCODED_LEN {
18918            panic!(
18919                "buffer is too small (need {} bytes, but got {})",
18920                Self::ENCODED_LEN,
18921                __tmp.remaining(),
18922            )
18923        }
18924        __tmp.put_u32_le(self.time_boot_ms);
18925        __tmp.put_f32_le(self.roll);
18926        __tmp.put_f32_le(self.pitch);
18927        __tmp.put_f32_le(self.yaw);
18928        __tmp.put_f32_le(self.thrust);
18929        __tmp.put_u8(self.mode_switch);
18930        __tmp.put_u8(self.manual_override_switch);
18931        if matches!(version, MavlinkVersion::V2) {
18932            let len = __tmp.len();
18933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18934        } else {
18935            __tmp.len()
18936        }
18937    }
18938}
18939#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18940#[doc = ""]
18941#[doc = "ID: 249"]
18942#[derive(Debug, Clone, PartialEq)]
18943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18945#[cfg_attr(feature = "ts", derive(TS))]
18946#[cfg_attr(feature = "ts", ts(export))]
18947pub struct MEMORY_VECT_DATA {
18948    #[doc = "Starting address of the debug variables"]
18949    pub address: u16,
18950    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18951    pub ver: u8,
18952    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18953    pub mavtype: u8,
18954    #[doc = "Memory contents at specified address"]
18955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18957    pub value: [i8; 32],
18958}
18959impl MEMORY_VECT_DATA {
18960    pub const ENCODED_LEN: usize = 36usize;
18961    pub const DEFAULT: Self = Self {
18962        address: 0_u16,
18963        ver: 0_u8,
18964        mavtype: 0_u8,
18965        value: [0_i8; 32usize],
18966    };
18967    #[cfg(feature = "arbitrary")]
18968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18969        use arbitrary::{Arbitrary, Unstructured};
18970        let mut buf = [0u8; 1024];
18971        rng.fill_bytes(&mut buf);
18972        let mut unstructured = Unstructured::new(&buf);
18973        Self::arbitrary(&mut unstructured).unwrap_or_default()
18974    }
18975}
18976impl Default for MEMORY_VECT_DATA {
18977    fn default() -> Self {
18978        Self::DEFAULT.clone()
18979    }
18980}
18981impl MessageData for MEMORY_VECT_DATA {
18982    type Message = MavMessage;
18983    const ID: u32 = 249u32;
18984    const NAME: &'static str = "MEMORY_VECT";
18985    const EXTRA_CRC: u8 = 204u8;
18986    const ENCODED_LEN: usize = 36usize;
18987    fn deser(
18988        _version: MavlinkVersion,
18989        __input: &[u8],
18990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18991        let avail_len = __input.len();
18992        let mut payload_buf = [0; Self::ENCODED_LEN];
18993        let mut buf = if avail_len < Self::ENCODED_LEN {
18994            payload_buf[0..avail_len].copy_from_slice(__input);
18995            Bytes::new(&payload_buf)
18996        } else {
18997            Bytes::new(__input)
18998        };
18999        let mut __struct = Self::default();
19000        __struct.address = buf.get_u16_le();
19001        __struct.ver = buf.get_u8();
19002        __struct.mavtype = buf.get_u8();
19003        for v in &mut __struct.value {
19004            let val = buf.get_i8();
19005            *v = val;
19006        }
19007        Ok(__struct)
19008    }
19009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19010        let mut __tmp = BytesMut::new(bytes);
19011        #[allow(clippy::absurd_extreme_comparisons)]
19012        #[allow(unused_comparisons)]
19013        if __tmp.remaining() < Self::ENCODED_LEN {
19014            panic!(
19015                "buffer is too small (need {} bytes, but got {})",
19016                Self::ENCODED_LEN,
19017                __tmp.remaining(),
19018            )
19019        }
19020        __tmp.put_u16_le(self.address);
19021        __tmp.put_u8(self.ver);
19022        __tmp.put_u8(self.mavtype);
19023        for val in &self.value {
19024            __tmp.put_i8(*val);
19025        }
19026        if matches!(version, MavlinkVersion::V2) {
19027            let len = __tmp.len();
19028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19029        } else {
19030            __tmp.len()
19031        }
19032    }
19033}
19034#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19035#[doc = ""]
19036#[doc = "ID: 244"]
19037#[derive(Debug, Clone, PartialEq)]
19038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19040#[cfg_attr(feature = "ts", derive(TS))]
19041#[cfg_attr(feature = "ts", ts(export))]
19042pub struct MESSAGE_INTERVAL_DATA {
19043    #[doc = "0 indicates the interval at which it is sent."]
19044    pub interval_us: i32,
19045    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19046    pub message_id: u16,
19047}
19048impl MESSAGE_INTERVAL_DATA {
19049    pub const ENCODED_LEN: usize = 6usize;
19050    pub const DEFAULT: Self = Self {
19051        interval_us: 0_i32,
19052        message_id: 0_u16,
19053    };
19054    #[cfg(feature = "arbitrary")]
19055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19056        use arbitrary::{Arbitrary, Unstructured};
19057        let mut buf = [0u8; 1024];
19058        rng.fill_bytes(&mut buf);
19059        let mut unstructured = Unstructured::new(&buf);
19060        Self::arbitrary(&mut unstructured).unwrap_or_default()
19061    }
19062}
19063impl Default for MESSAGE_INTERVAL_DATA {
19064    fn default() -> Self {
19065        Self::DEFAULT.clone()
19066    }
19067}
19068impl MessageData for MESSAGE_INTERVAL_DATA {
19069    type Message = MavMessage;
19070    const ID: u32 = 244u32;
19071    const NAME: &'static str = "MESSAGE_INTERVAL";
19072    const EXTRA_CRC: u8 = 95u8;
19073    const ENCODED_LEN: usize = 6usize;
19074    fn deser(
19075        _version: MavlinkVersion,
19076        __input: &[u8],
19077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19078        let avail_len = __input.len();
19079        let mut payload_buf = [0; Self::ENCODED_LEN];
19080        let mut buf = if avail_len < Self::ENCODED_LEN {
19081            payload_buf[0..avail_len].copy_from_slice(__input);
19082            Bytes::new(&payload_buf)
19083        } else {
19084            Bytes::new(__input)
19085        };
19086        let mut __struct = Self::default();
19087        __struct.interval_us = buf.get_i32_le();
19088        __struct.message_id = buf.get_u16_le();
19089        Ok(__struct)
19090    }
19091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19092        let mut __tmp = BytesMut::new(bytes);
19093        #[allow(clippy::absurd_extreme_comparisons)]
19094        #[allow(unused_comparisons)]
19095        if __tmp.remaining() < Self::ENCODED_LEN {
19096            panic!(
19097                "buffer is too small (need {} bytes, but got {})",
19098                Self::ENCODED_LEN,
19099                __tmp.remaining(),
19100            )
19101        }
19102        __tmp.put_i32_le(self.interval_us);
19103        __tmp.put_u16_le(self.message_id);
19104        if matches!(version, MavlinkVersion::V2) {
19105            let len = __tmp.len();
19106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19107        } else {
19108            __tmp.len()
19109        }
19110    }
19111}
19112#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19113#[doc = ""]
19114#[doc = "ID: 47"]
19115#[derive(Debug, Clone, PartialEq)]
19116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19118#[cfg_attr(feature = "ts", derive(TS))]
19119#[cfg_attr(feature = "ts", ts(export))]
19120pub struct MISSION_ACK_DATA {
19121    #[doc = "System ID"]
19122    pub target_system: u8,
19123    #[doc = "Component ID"]
19124    pub target_component: u8,
19125    #[doc = "Mission result."]
19126    pub mavtype: MavMissionResult,
19127    #[doc = "Mission type."]
19128    #[cfg_attr(feature = "serde", serde(default))]
19129    pub mission_type: MavMissionType,
19130    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19131    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19132    pub opaque_id: u32,
19133}
19134impl MISSION_ACK_DATA {
19135    pub const ENCODED_LEN: usize = 8usize;
19136    pub const DEFAULT: Self = Self {
19137        target_system: 0_u8,
19138        target_component: 0_u8,
19139        mavtype: MavMissionResult::DEFAULT,
19140        mission_type: MavMissionType::DEFAULT,
19141        opaque_id: 0_u32,
19142    };
19143    #[cfg(feature = "arbitrary")]
19144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19145        use arbitrary::{Arbitrary, Unstructured};
19146        let mut buf = [0u8; 1024];
19147        rng.fill_bytes(&mut buf);
19148        let mut unstructured = Unstructured::new(&buf);
19149        Self::arbitrary(&mut unstructured).unwrap_or_default()
19150    }
19151}
19152impl Default for MISSION_ACK_DATA {
19153    fn default() -> Self {
19154        Self::DEFAULT.clone()
19155    }
19156}
19157impl MessageData for MISSION_ACK_DATA {
19158    type Message = MavMessage;
19159    const ID: u32 = 47u32;
19160    const NAME: &'static str = "MISSION_ACK";
19161    const EXTRA_CRC: u8 = 153u8;
19162    const ENCODED_LEN: usize = 8usize;
19163    fn deser(
19164        _version: MavlinkVersion,
19165        __input: &[u8],
19166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19167        let avail_len = __input.len();
19168        let mut payload_buf = [0; Self::ENCODED_LEN];
19169        let mut buf = if avail_len < Self::ENCODED_LEN {
19170            payload_buf[0..avail_len].copy_from_slice(__input);
19171            Bytes::new(&payload_buf)
19172        } else {
19173            Bytes::new(__input)
19174        };
19175        let mut __struct = Self::default();
19176        __struct.target_system = buf.get_u8();
19177        __struct.target_component = buf.get_u8();
19178        let tmp = buf.get_u8();
19179        __struct.mavtype =
19180            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19181                enum_type: "MavMissionResult",
19182                value: tmp as u32,
19183            })?;
19184        let tmp = buf.get_u8();
19185        __struct.mission_type =
19186            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19187                enum_type: "MavMissionType",
19188                value: tmp as u32,
19189            })?;
19190        __struct.opaque_id = buf.get_u32_le();
19191        Ok(__struct)
19192    }
19193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19194        let mut __tmp = BytesMut::new(bytes);
19195        #[allow(clippy::absurd_extreme_comparisons)]
19196        #[allow(unused_comparisons)]
19197        if __tmp.remaining() < Self::ENCODED_LEN {
19198            panic!(
19199                "buffer is too small (need {} bytes, but got {})",
19200                Self::ENCODED_LEN,
19201                __tmp.remaining(),
19202            )
19203        }
19204        __tmp.put_u8(self.target_system);
19205        __tmp.put_u8(self.target_component);
19206        __tmp.put_u8(self.mavtype as u8);
19207        if matches!(version, MavlinkVersion::V2) {
19208            __tmp.put_u8(self.mission_type as u8);
19209            __tmp.put_u32_le(self.opaque_id);
19210            let len = __tmp.len();
19211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19212        } else {
19213            __tmp.len()
19214        }
19215    }
19216}
19217#[doc = "Delete all mission items at once."]
19218#[doc = ""]
19219#[doc = "ID: 45"]
19220#[derive(Debug, Clone, PartialEq)]
19221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19223#[cfg_attr(feature = "ts", derive(TS))]
19224#[cfg_attr(feature = "ts", ts(export))]
19225pub struct MISSION_CLEAR_ALL_DATA {
19226    #[doc = "System ID"]
19227    pub target_system: u8,
19228    #[doc = "Component ID"]
19229    pub target_component: u8,
19230    #[doc = "Mission type."]
19231    #[cfg_attr(feature = "serde", serde(default))]
19232    pub mission_type: MavMissionType,
19233}
19234impl MISSION_CLEAR_ALL_DATA {
19235    pub const ENCODED_LEN: usize = 3usize;
19236    pub const DEFAULT: Self = Self {
19237        target_system: 0_u8,
19238        target_component: 0_u8,
19239        mission_type: MavMissionType::DEFAULT,
19240    };
19241    #[cfg(feature = "arbitrary")]
19242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19243        use arbitrary::{Arbitrary, Unstructured};
19244        let mut buf = [0u8; 1024];
19245        rng.fill_bytes(&mut buf);
19246        let mut unstructured = Unstructured::new(&buf);
19247        Self::arbitrary(&mut unstructured).unwrap_or_default()
19248    }
19249}
19250impl Default for MISSION_CLEAR_ALL_DATA {
19251    fn default() -> Self {
19252        Self::DEFAULT.clone()
19253    }
19254}
19255impl MessageData for MISSION_CLEAR_ALL_DATA {
19256    type Message = MavMessage;
19257    const ID: u32 = 45u32;
19258    const NAME: &'static str = "MISSION_CLEAR_ALL";
19259    const EXTRA_CRC: u8 = 232u8;
19260    const ENCODED_LEN: usize = 3usize;
19261    fn deser(
19262        _version: MavlinkVersion,
19263        __input: &[u8],
19264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19265        let avail_len = __input.len();
19266        let mut payload_buf = [0; Self::ENCODED_LEN];
19267        let mut buf = if avail_len < Self::ENCODED_LEN {
19268            payload_buf[0..avail_len].copy_from_slice(__input);
19269            Bytes::new(&payload_buf)
19270        } else {
19271            Bytes::new(__input)
19272        };
19273        let mut __struct = Self::default();
19274        __struct.target_system = buf.get_u8();
19275        __struct.target_component = buf.get_u8();
19276        let tmp = buf.get_u8();
19277        __struct.mission_type =
19278            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19279                enum_type: "MavMissionType",
19280                value: tmp as u32,
19281            })?;
19282        Ok(__struct)
19283    }
19284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19285        let mut __tmp = BytesMut::new(bytes);
19286        #[allow(clippy::absurd_extreme_comparisons)]
19287        #[allow(unused_comparisons)]
19288        if __tmp.remaining() < Self::ENCODED_LEN {
19289            panic!(
19290                "buffer is too small (need {} bytes, but got {})",
19291                Self::ENCODED_LEN,
19292                __tmp.remaining(),
19293            )
19294        }
19295        __tmp.put_u8(self.target_system);
19296        __tmp.put_u8(self.target_component);
19297        if matches!(version, MavlinkVersion::V2) {
19298            __tmp.put_u8(self.mission_type as u8);
19299            let len = __tmp.len();
19300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19301        } else {
19302            __tmp.len()
19303        }
19304    }
19305}
19306#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19307#[doc = ""]
19308#[doc = "ID: 44"]
19309#[derive(Debug, Clone, PartialEq)]
19310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19312#[cfg_attr(feature = "ts", derive(TS))]
19313#[cfg_attr(feature = "ts", ts(export))]
19314pub struct MISSION_COUNT_DATA {
19315    #[doc = "Number of mission items in the sequence"]
19316    pub count: u16,
19317    #[doc = "System ID"]
19318    pub target_system: u8,
19319    #[doc = "Component ID"]
19320    pub target_component: u8,
19321    #[doc = "Mission type."]
19322    #[cfg_attr(feature = "serde", serde(default))]
19323    pub mission_type: MavMissionType,
19324    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19326    pub opaque_id: u32,
19327}
19328impl MISSION_COUNT_DATA {
19329    pub const ENCODED_LEN: usize = 9usize;
19330    pub const DEFAULT: Self = Self {
19331        count: 0_u16,
19332        target_system: 0_u8,
19333        target_component: 0_u8,
19334        mission_type: MavMissionType::DEFAULT,
19335        opaque_id: 0_u32,
19336    };
19337    #[cfg(feature = "arbitrary")]
19338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19339        use arbitrary::{Arbitrary, Unstructured};
19340        let mut buf = [0u8; 1024];
19341        rng.fill_bytes(&mut buf);
19342        let mut unstructured = Unstructured::new(&buf);
19343        Self::arbitrary(&mut unstructured).unwrap_or_default()
19344    }
19345}
19346impl Default for MISSION_COUNT_DATA {
19347    fn default() -> Self {
19348        Self::DEFAULT.clone()
19349    }
19350}
19351impl MessageData for MISSION_COUNT_DATA {
19352    type Message = MavMessage;
19353    const ID: u32 = 44u32;
19354    const NAME: &'static str = "MISSION_COUNT";
19355    const EXTRA_CRC: u8 = 221u8;
19356    const ENCODED_LEN: usize = 9usize;
19357    fn deser(
19358        _version: MavlinkVersion,
19359        __input: &[u8],
19360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19361        let avail_len = __input.len();
19362        let mut payload_buf = [0; Self::ENCODED_LEN];
19363        let mut buf = if avail_len < Self::ENCODED_LEN {
19364            payload_buf[0..avail_len].copy_from_slice(__input);
19365            Bytes::new(&payload_buf)
19366        } else {
19367            Bytes::new(__input)
19368        };
19369        let mut __struct = Self::default();
19370        __struct.count = buf.get_u16_le();
19371        __struct.target_system = buf.get_u8();
19372        __struct.target_component = buf.get_u8();
19373        let tmp = buf.get_u8();
19374        __struct.mission_type =
19375            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19376                enum_type: "MavMissionType",
19377                value: tmp as u32,
19378            })?;
19379        __struct.opaque_id = buf.get_u32_le();
19380        Ok(__struct)
19381    }
19382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19383        let mut __tmp = BytesMut::new(bytes);
19384        #[allow(clippy::absurd_extreme_comparisons)]
19385        #[allow(unused_comparisons)]
19386        if __tmp.remaining() < Self::ENCODED_LEN {
19387            panic!(
19388                "buffer is too small (need {} bytes, but got {})",
19389                Self::ENCODED_LEN,
19390                __tmp.remaining(),
19391            )
19392        }
19393        __tmp.put_u16_le(self.count);
19394        __tmp.put_u8(self.target_system);
19395        __tmp.put_u8(self.target_component);
19396        if matches!(version, MavlinkVersion::V2) {
19397            __tmp.put_u8(self.mission_type as u8);
19398            __tmp.put_u32_le(self.opaque_id);
19399            let len = __tmp.len();
19400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19401        } else {
19402            __tmp.len()
19403        }
19404    }
19405}
19406#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19407#[doc = ""]
19408#[doc = "ID: 42"]
19409#[derive(Debug, Clone, PartialEq)]
19410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19412#[cfg_attr(feature = "ts", derive(TS))]
19413#[cfg_attr(feature = "ts", ts(export))]
19414pub struct MISSION_CURRENT_DATA {
19415    #[doc = "Sequence"]
19416    pub seq: u16,
19417    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19419    pub total: u16,
19420    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19421    #[cfg_attr(feature = "serde", serde(default))]
19422    pub mission_state: MissionState,
19423    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19425    pub mission_mode: u8,
19426    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19428    pub mission_id: u32,
19429    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19431    pub fence_id: u32,
19432    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19434    pub rally_points_id: u32,
19435}
19436impl MISSION_CURRENT_DATA {
19437    pub const ENCODED_LEN: usize = 18usize;
19438    pub const DEFAULT: Self = Self {
19439        seq: 0_u16,
19440        total: 0_u16,
19441        mission_state: MissionState::DEFAULT,
19442        mission_mode: 0_u8,
19443        mission_id: 0_u32,
19444        fence_id: 0_u32,
19445        rally_points_id: 0_u32,
19446    };
19447    #[cfg(feature = "arbitrary")]
19448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19449        use arbitrary::{Arbitrary, Unstructured};
19450        let mut buf = [0u8; 1024];
19451        rng.fill_bytes(&mut buf);
19452        let mut unstructured = Unstructured::new(&buf);
19453        Self::arbitrary(&mut unstructured).unwrap_or_default()
19454    }
19455}
19456impl Default for MISSION_CURRENT_DATA {
19457    fn default() -> Self {
19458        Self::DEFAULT.clone()
19459    }
19460}
19461impl MessageData for MISSION_CURRENT_DATA {
19462    type Message = MavMessage;
19463    const ID: u32 = 42u32;
19464    const NAME: &'static str = "MISSION_CURRENT";
19465    const EXTRA_CRC: u8 = 28u8;
19466    const ENCODED_LEN: usize = 18usize;
19467    fn deser(
19468        _version: MavlinkVersion,
19469        __input: &[u8],
19470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19471        let avail_len = __input.len();
19472        let mut payload_buf = [0; Self::ENCODED_LEN];
19473        let mut buf = if avail_len < Self::ENCODED_LEN {
19474            payload_buf[0..avail_len].copy_from_slice(__input);
19475            Bytes::new(&payload_buf)
19476        } else {
19477            Bytes::new(__input)
19478        };
19479        let mut __struct = Self::default();
19480        __struct.seq = buf.get_u16_le();
19481        __struct.total = buf.get_u16_le();
19482        let tmp = buf.get_u8();
19483        __struct.mission_state =
19484            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19485                enum_type: "MissionState",
19486                value: tmp as u32,
19487            })?;
19488        __struct.mission_mode = buf.get_u8();
19489        __struct.mission_id = buf.get_u32_le();
19490        __struct.fence_id = buf.get_u32_le();
19491        __struct.rally_points_id = buf.get_u32_le();
19492        Ok(__struct)
19493    }
19494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19495        let mut __tmp = BytesMut::new(bytes);
19496        #[allow(clippy::absurd_extreme_comparisons)]
19497        #[allow(unused_comparisons)]
19498        if __tmp.remaining() < Self::ENCODED_LEN {
19499            panic!(
19500                "buffer is too small (need {} bytes, but got {})",
19501                Self::ENCODED_LEN,
19502                __tmp.remaining(),
19503            )
19504        }
19505        __tmp.put_u16_le(self.seq);
19506        if matches!(version, MavlinkVersion::V2) {
19507            __tmp.put_u16_le(self.total);
19508            __tmp.put_u8(self.mission_state as u8);
19509            __tmp.put_u8(self.mission_mode);
19510            __tmp.put_u32_le(self.mission_id);
19511            __tmp.put_u32_le(self.fence_id);
19512            __tmp.put_u32_le(self.rally_points_id);
19513            let len = __tmp.len();
19514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19515        } else {
19516            __tmp.len()
19517        }
19518    }
19519}
19520#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19521#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19522#[doc = ""]
19523#[doc = "ID: 39"]
19524#[derive(Debug, Clone, PartialEq)]
19525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19527#[cfg_attr(feature = "ts", derive(TS))]
19528#[cfg_attr(feature = "ts", ts(export))]
19529pub struct MISSION_ITEM_DATA {
19530    #[doc = "PARAM1, see MAV_CMD enum"]
19531    pub param1: f32,
19532    #[doc = "PARAM2, see MAV_CMD enum"]
19533    pub param2: f32,
19534    #[doc = "PARAM3, see MAV_CMD enum"]
19535    pub param3: f32,
19536    #[doc = "PARAM4, see MAV_CMD enum"]
19537    pub param4: f32,
19538    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19539    pub x: f32,
19540    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19541    pub y: f32,
19542    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19543    pub z: f32,
19544    #[doc = "Sequence"]
19545    pub seq: u16,
19546    #[doc = "The scheduled action for the waypoint."]
19547    pub command: MavCmd,
19548    #[doc = "System ID"]
19549    pub target_system: u8,
19550    #[doc = "Component ID"]
19551    pub target_component: u8,
19552    #[doc = "The coordinate system of the waypoint."]
19553    pub frame: MavFrame,
19554    #[doc = "false:0, true:1"]
19555    pub current: u8,
19556    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19557    pub autocontinue: u8,
19558    #[doc = "Mission type."]
19559    #[cfg_attr(feature = "serde", serde(default))]
19560    pub mission_type: MavMissionType,
19561}
19562impl MISSION_ITEM_DATA {
19563    pub const ENCODED_LEN: usize = 38usize;
19564    pub const DEFAULT: Self = Self {
19565        param1: 0.0_f32,
19566        param2: 0.0_f32,
19567        param3: 0.0_f32,
19568        param4: 0.0_f32,
19569        x: 0.0_f32,
19570        y: 0.0_f32,
19571        z: 0.0_f32,
19572        seq: 0_u16,
19573        command: MavCmd::DEFAULT,
19574        target_system: 0_u8,
19575        target_component: 0_u8,
19576        frame: MavFrame::DEFAULT,
19577        current: 0_u8,
19578        autocontinue: 0_u8,
19579        mission_type: MavMissionType::DEFAULT,
19580    };
19581    #[cfg(feature = "arbitrary")]
19582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19583        use arbitrary::{Arbitrary, Unstructured};
19584        let mut buf = [0u8; 1024];
19585        rng.fill_bytes(&mut buf);
19586        let mut unstructured = Unstructured::new(&buf);
19587        Self::arbitrary(&mut unstructured).unwrap_or_default()
19588    }
19589}
19590impl Default for MISSION_ITEM_DATA {
19591    fn default() -> Self {
19592        Self::DEFAULT.clone()
19593    }
19594}
19595impl MessageData for MISSION_ITEM_DATA {
19596    type Message = MavMessage;
19597    const ID: u32 = 39u32;
19598    const NAME: &'static str = "MISSION_ITEM";
19599    const EXTRA_CRC: u8 = 254u8;
19600    const ENCODED_LEN: usize = 38usize;
19601    fn deser(
19602        _version: MavlinkVersion,
19603        __input: &[u8],
19604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19605        let avail_len = __input.len();
19606        let mut payload_buf = [0; Self::ENCODED_LEN];
19607        let mut buf = if avail_len < Self::ENCODED_LEN {
19608            payload_buf[0..avail_len].copy_from_slice(__input);
19609            Bytes::new(&payload_buf)
19610        } else {
19611            Bytes::new(__input)
19612        };
19613        let mut __struct = Self::default();
19614        __struct.param1 = buf.get_f32_le();
19615        __struct.param2 = buf.get_f32_le();
19616        __struct.param3 = buf.get_f32_le();
19617        __struct.param4 = buf.get_f32_le();
19618        __struct.x = buf.get_f32_le();
19619        __struct.y = buf.get_f32_le();
19620        __struct.z = buf.get_f32_le();
19621        __struct.seq = buf.get_u16_le();
19622        let tmp = buf.get_u16_le();
19623        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19624            ::mavlink_core::error::ParserError::InvalidEnum {
19625                enum_type: "MavCmd",
19626                value: tmp as u32,
19627            },
19628        )?;
19629        __struct.target_system = buf.get_u8();
19630        __struct.target_component = buf.get_u8();
19631        let tmp = buf.get_u8();
19632        __struct.frame =
19633            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19634                enum_type: "MavFrame",
19635                value: tmp as u32,
19636            })?;
19637        __struct.current = buf.get_u8();
19638        __struct.autocontinue = buf.get_u8();
19639        let tmp = buf.get_u8();
19640        __struct.mission_type =
19641            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19642                enum_type: "MavMissionType",
19643                value: tmp as u32,
19644            })?;
19645        Ok(__struct)
19646    }
19647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19648        let mut __tmp = BytesMut::new(bytes);
19649        #[allow(clippy::absurd_extreme_comparisons)]
19650        #[allow(unused_comparisons)]
19651        if __tmp.remaining() < Self::ENCODED_LEN {
19652            panic!(
19653                "buffer is too small (need {} bytes, but got {})",
19654                Self::ENCODED_LEN,
19655                __tmp.remaining(),
19656            )
19657        }
19658        __tmp.put_f32_le(self.param1);
19659        __tmp.put_f32_le(self.param2);
19660        __tmp.put_f32_le(self.param3);
19661        __tmp.put_f32_le(self.param4);
19662        __tmp.put_f32_le(self.x);
19663        __tmp.put_f32_le(self.y);
19664        __tmp.put_f32_le(self.z);
19665        __tmp.put_u16_le(self.seq);
19666        __tmp.put_u16_le(self.command as u16);
19667        __tmp.put_u8(self.target_system);
19668        __tmp.put_u8(self.target_component);
19669        __tmp.put_u8(self.frame as u8);
19670        __tmp.put_u8(self.current);
19671        __tmp.put_u8(self.autocontinue);
19672        if matches!(version, MavlinkVersion::V2) {
19673            __tmp.put_u8(self.mission_type as u8);
19674            let len = __tmp.len();
19675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19676        } else {
19677            __tmp.len()
19678        }
19679    }
19680}
19681#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19682#[doc = ""]
19683#[doc = "ID: 73"]
19684#[derive(Debug, Clone, PartialEq)]
19685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19687#[cfg_attr(feature = "ts", derive(TS))]
19688#[cfg_attr(feature = "ts", ts(export))]
19689pub struct MISSION_ITEM_INT_DATA {
19690    #[doc = "PARAM1, see MAV_CMD enum"]
19691    pub param1: f32,
19692    #[doc = "PARAM2, see MAV_CMD enum"]
19693    pub param2: f32,
19694    #[doc = "PARAM3, see MAV_CMD enum"]
19695    pub param3: f32,
19696    #[doc = "PARAM4, see MAV_CMD enum"]
19697    pub param4: f32,
19698    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19699    pub x: i32,
19700    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19701    pub y: i32,
19702    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19703    pub z: f32,
19704    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19705    pub seq: u16,
19706    #[doc = "The scheduled action for the waypoint."]
19707    pub command: MavCmd,
19708    #[doc = "System ID"]
19709    pub target_system: u8,
19710    #[doc = "Component ID"]
19711    pub target_component: u8,
19712    #[doc = "The coordinate system of the waypoint."]
19713    pub frame: MavFrame,
19714    #[doc = "false:0, true:1"]
19715    pub current: u8,
19716    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19717    pub autocontinue: u8,
19718    #[doc = "Mission type."]
19719    #[cfg_attr(feature = "serde", serde(default))]
19720    pub mission_type: MavMissionType,
19721}
19722impl MISSION_ITEM_INT_DATA {
19723    pub const ENCODED_LEN: usize = 38usize;
19724    pub const DEFAULT: Self = Self {
19725        param1: 0.0_f32,
19726        param2: 0.0_f32,
19727        param3: 0.0_f32,
19728        param4: 0.0_f32,
19729        x: 0_i32,
19730        y: 0_i32,
19731        z: 0.0_f32,
19732        seq: 0_u16,
19733        command: MavCmd::DEFAULT,
19734        target_system: 0_u8,
19735        target_component: 0_u8,
19736        frame: MavFrame::DEFAULT,
19737        current: 0_u8,
19738        autocontinue: 0_u8,
19739        mission_type: MavMissionType::DEFAULT,
19740    };
19741    #[cfg(feature = "arbitrary")]
19742    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19743        use arbitrary::{Arbitrary, Unstructured};
19744        let mut buf = [0u8; 1024];
19745        rng.fill_bytes(&mut buf);
19746        let mut unstructured = Unstructured::new(&buf);
19747        Self::arbitrary(&mut unstructured).unwrap_or_default()
19748    }
19749}
19750impl Default for MISSION_ITEM_INT_DATA {
19751    fn default() -> Self {
19752        Self::DEFAULT.clone()
19753    }
19754}
19755impl MessageData for MISSION_ITEM_INT_DATA {
19756    type Message = MavMessage;
19757    const ID: u32 = 73u32;
19758    const NAME: &'static str = "MISSION_ITEM_INT";
19759    const EXTRA_CRC: u8 = 38u8;
19760    const ENCODED_LEN: usize = 38usize;
19761    fn deser(
19762        _version: MavlinkVersion,
19763        __input: &[u8],
19764    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19765        let avail_len = __input.len();
19766        let mut payload_buf = [0; Self::ENCODED_LEN];
19767        let mut buf = if avail_len < Self::ENCODED_LEN {
19768            payload_buf[0..avail_len].copy_from_slice(__input);
19769            Bytes::new(&payload_buf)
19770        } else {
19771            Bytes::new(__input)
19772        };
19773        let mut __struct = Self::default();
19774        __struct.param1 = buf.get_f32_le();
19775        __struct.param2 = buf.get_f32_le();
19776        __struct.param3 = buf.get_f32_le();
19777        __struct.param4 = buf.get_f32_le();
19778        __struct.x = buf.get_i32_le();
19779        __struct.y = buf.get_i32_le();
19780        __struct.z = buf.get_f32_le();
19781        __struct.seq = buf.get_u16_le();
19782        let tmp = buf.get_u16_le();
19783        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19784            ::mavlink_core::error::ParserError::InvalidEnum {
19785                enum_type: "MavCmd",
19786                value: tmp as u32,
19787            },
19788        )?;
19789        __struct.target_system = buf.get_u8();
19790        __struct.target_component = buf.get_u8();
19791        let tmp = buf.get_u8();
19792        __struct.frame =
19793            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19794                enum_type: "MavFrame",
19795                value: tmp as u32,
19796            })?;
19797        __struct.current = buf.get_u8();
19798        __struct.autocontinue = buf.get_u8();
19799        let tmp = buf.get_u8();
19800        __struct.mission_type =
19801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19802                enum_type: "MavMissionType",
19803                value: tmp as u32,
19804            })?;
19805        Ok(__struct)
19806    }
19807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19808        let mut __tmp = BytesMut::new(bytes);
19809        #[allow(clippy::absurd_extreme_comparisons)]
19810        #[allow(unused_comparisons)]
19811        if __tmp.remaining() < Self::ENCODED_LEN {
19812            panic!(
19813                "buffer is too small (need {} bytes, but got {})",
19814                Self::ENCODED_LEN,
19815                __tmp.remaining(),
19816            )
19817        }
19818        __tmp.put_f32_le(self.param1);
19819        __tmp.put_f32_le(self.param2);
19820        __tmp.put_f32_le(self.param3);
19821        __tmp.put_f32_le(self.param4);
19822        __tmp.put_i32_le(self.x);
19823        __tmp.put_i32_le(self.y);
19824        __tmp.put_f32_le(self.z);
19825        __tmp.put_u16_le(self.seq);
19826        __tmp.put_u16_le(self.command as u16);
19827        __tmp.put_u8(self.target_system);
19828        __tmp.put_u8(self.target_component);
19829        __tmp.put_u8(self.frame as u8);
19830        __tmp.put_u8(self.current);
19831        __tmp.put_u8(self.autocontinue);
19832        if matches!(version, MavlinkVersion::V2) {
19833            __tmp.put_u8(self.mission_type as u8);
19834            let len = __tmp.len();
19835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19836        } else {
19837            __tmp.len()
19838        }
19839    }
19840}
19841#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19842#[doc = ""]
19843#[doc = "ID: 46"]
19844#[derive(Debug, Clone, PartialEq)]
19845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19847#[cfg_attr(feature = "ts", derive(TS))]
19848#[cfg_attr(feature = "ts", ts(export))]
19849pub struct MISSION_ITEM_REACHED_DATA {
19850    #[doc = "Sequence"]
19851    pub seq: u16,
19852}
19853impl MISSION_ITEM_REACHED_DATA {
19854    pub const ENCODED_LEN: usize = 2usize;
19855    pub const DEFAULT: Self = Self { seq: 0_u16 };
19856    #[cfg(feature = "arbitrary")]
19857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19858        use arbitrary::{Arbitrary, Unstructured};
19859        let mut buf = [0u8; 1024];
19860        rng.fill_bytes(&mut buf);
19861        let mut unstructured = Unstructured::new(&buf);
19862        Self::arbitrary(&mut unstructured).unwrap_or_default()
19863    }
19864}
19865impl Default for MISSION_ITEM_REACHED_DATA {
19866    fn default() -> Self {
19867        Self::DEFAULT.clone()
19868    }
19869}
19870impl MessageData for MISSION_ITEM_REACHED_DATA {
19871    type Message = MavMessage;
19872    const ID: u32 = 46u32;
19873    const NAME: &'static str = "MISSION_ITEM_REACHED";
19874    const EXTRA_CRC: u8 = 11u8;
19875    const ENCODED_LEN: usize = 2usize;
19876    fn deser(
19877        _version: MavlinkVersion,
19878        __input: &[u8],
19879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19880        let avail_len = __input.len();
19881        let mut payload_buf = [0; Self::ENCODED_LEN];
19882        let mut buf = if avail_len < Self::ENCODED_LEN {
19883            payload_buf[0..avail_len].copy_from_slice(__input);
19884            Bytes::new(&payload_buf)
19885        } else {
19886            Bytes::new(__input)
19887        };
19888        let mut __struct = Self::default();
19889        __struct.seq = buf.get_u16_le();
19890        Ok(__struct)
19891    }
19892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19893        let mut __tmp = BytesMut::new(bytes);
19894        #[allow(clippy::absurd_extreme_comparisons)]
19895        #[allow(unused_comparisons)]
19896        if __tmp.remaining() < Self::ENCODED_LEN {
19897            panic!(
19898                "buffer is too small (need {} bytes, but got {})",
19899                Self::ENCODED_LEN,
19900                __tmp.remaining(),
19901            )
19902        }
19903        __tmp.put_u16_le(self.seq);
19904        if matches!(version, MavlinkVersion::V2) {
19905            let len = __tmp.len();
19906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19907        } else {
19908            __tmp.len()
19909        }
19910    }
19911}
19912#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19913#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19914#[doc = ""]
19915#[doc = "ID: 40"]
19916#[derive(Debug, Clone, PartialEq)]
19917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19919#[cfg_attr(feature = "ts", derive(TS))]
19920#[cfg_attr(feature = "ts", ts(export))]
19921pub struct MISSION_REQUEST_DATA {
19922    #[doc = "Sequence"]
19923    pub seq: u16,
19924    #[doc = "System ID"]
19925    pub target_system: u8,
19926    #[doc = "Component ID"]
19927    pub target_component: u8,
19928    #[doc = "Mission type."]
19929    #[cfg_attr(feature = "serde", serde(default))]
19930    pub mission_type: MavMissionType,
19931}
19932impl MISSION_REQUEST_DATA {
19933    pub const ENCODED_LEN: usize = 5usize;
19934    pub const DEFAULT: Self = Self {
19935        seq: 0_u16,
19936        target_system: 0_u8,
19937        target_component: 0_u8,
19938        mission_type: MavMissionType::DEFAULT,
19939    };
19940    #[cfg(feature = "arbitrary")]
19941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19942        use arbitrary::{Arbitrary, Unstructured};
19943        let mut buf = [0u8; 1024];
19944        rng.fill_bytes(&mut buf);
19945        let mut unstructured = Unstructured::new(&buf);
19946        Self::arbitrary(&mut unstructured).unwrap_or_default()
19947    }
19948}
19949impl Default for MISSION_REQUEST_DATA {
19950    fn default() -> Self {
19951        Self::DEFAULT.clone()
19952    }
19953}
19954impl MessageData for MISSION_REQUEST_DATA {
19955    type Message = MavMessage;
19956    const ID: u32 = 40u32;
19957    const NAME: &'static str = "MISSION_REQUEST";
19958    const EXTRA_CRC: u8 = 230u8;
19959    const ENCODED_LEN: usize = 5usize;
19960    fn deser(
19961        _version: MavlinkVersion,
19962        __input: &[u8],
19963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19964        let avail_len = __input.len();
19965        let mut payload_buf = [0; Self::ENCODED_LEN];
19966        let mut buf = if avail_len < Self::ENCODED_LEN {
19967            payload_buf[0..avail_len].copy_from_slice(__input);
19968            Bytes::new(&payload_buf)
19969        } else {
19970            Bytes::new(__input)
19971        };
19972        let mut __struct = Self::default();
19973        __struct.seq = buf.get_u16_le();
19974        __struct.target_system = buf.get_u8();
19975        __struct.target_component = buf.get_u8();
19976        let tmp = buf.get_u8();
19977        __struct.mission_type =
19978            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19979                enum_type: "MavMissionType",
19980                value: tmp as u32,
19981            })?;
19982        Ok(__struct)
19983    }
19984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19985        let mut __tmp = BytesMut::new(bytes);
19986        #[allow(clippy::absurd_extreme_comparisons)]
19987        #[allow(unused_comparisons)]
19988        if __tmp.remaining() < Self::ENCODED_LEN {
19989            panic!(
19990                "buffer is too small (need {} bytes, but got {})",
19991                Self::ENCODED_LEN,
19992                __tmp.remaining(),
19993            )
19994        }
19995        __tmp.put_u16_le(self.seq);
19996        __tmp.put_u8(self.target_system);
19997        __tmp.put_u8(self.target_component);
19998        if matches!(version, MavlinkVersion::V2) {
19999            __tmp.put_u8(self.mission_type as u8);
20000            let len = __tmp.len();
20001            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20002        } else {
20003            __tmp.len()
20004        }
20005    }
20006}
20007#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20008#[doc = ""]
20009#[doc = "ID: 51"]
20010#[derive(Debug, Clone, PartialEq)]
20011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20013#[cfg_attr(feature = "ts", derive(TS))]
20014#[cfg_attr(feature = "ts", ts(export))]
20015pub struct MISSION_REQUEST_INT_DATA {
20016    #[doc = "Sequence"]
20017    pub seq: u16,
20018    #[doc = "System ID"]
20019    pub target_system: u8,
20020    #[doc = "Component ID"]
20021    pub target_component: u8,
20022    #[doc = "Mission type."]
20023    #[cfg_attr(feature = "serde", serde(default))]
20024    pub mission_type: MavMissionType,
20025}
20026impl MISSION_REQUEST_INT_DATA {
20027    pub const ENCODED_LEN: usize = 5usize;
20028    pub const DEFAULT: Self = Self {
20029        seq: 0_u16,
20030        target_system: 0_u8,
20031        target_component: 0_u8,
20032        mission_type: MavMissionType::DEFAULT,
20033    };
20034    #[cfg(feature = "arbitrary")]
20035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20036        use arbitrary::{Arbitrary, Unstructured};
20037        let mut buf = [0u8; 1024];
20038        rng.fill_bytes(&mut buf);
20039        let mut unstructured = Unstructured::new(&buf);
20040        Self::arbitrary(&mut unstructured).unwrap_or_default()
20041    }
20042}
20043impl Default for MISSION_REQUEST_INT_DATA {
20044    fn default() -> Self {
20045        Self::DEFAULT.clone()
20046    }
20047}
20048impl MessageData for MISSION_REQUEST_INT_DATA {
20049    type Message = MavMessage;
20050    const ID: u32 = 51u32;
20051    const NAME: &'static str = "MISSION_REQUEST_INT";
20052    const EXTRA_CRC: u8 = 196u8;
20053    const ENCODED_LEN: usize = 5usize;
20054    fn deser(
20055        _version: MavlinkVersion,
20056        __input: &[u8],
20057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20058        let avail_len = __input.len();
20059        let mut payload_buf = [0; Self::ENCODED_LEN];
20060        let mut buf = if avail_len < Self::ENCODED_LEN {
20061            payload_buf[0..avail_len].copy_from_slice(__input);
20062            Bytes::new(&payload_buf)
20063        } else {
20064            Bytes::new(__input)
20065        };
20066        let mut __struct = Self::default();
20067        __struct.seq = buf.get_u16_le();
20068        __struct.target_system = buf.get_u8();
20069        __struct.target_component = buf.get_u8();
20070        let tmp = buf.get_u8();
20071        __struct.mission_type =
20072            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20073                enum_type: "MavMissionType",
20074                value: tmp as u32,
20075            })?;
20076        Ok(__struct)
20077    }
20078    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20079        let mut __tmp = BytesMut::new(bytes);
20080        #[allow(clippy::absurd_extreme_comparisons)]
20081        #[allow(unused_comparisons)]
20082        if __tmp.remaining() < Self::ENCODED_LEN {
20083            panic!(
20084                "buffer is too small (need {} bytes, but got {})",
20085                Self::ENCODED_LEN,
20086                __tmp.remaining(),
20087            )
20088        }
20089        __tmp.put_u16_le(self.seq);
20090        __tmp.put_u8(self.target_system);
20091        __tmp.put_u8(self.target_component);
20092        if matches!(version, MavlinkVersion::V2) {
20093            __tmp.put_u8(self.mission_type as u8);
20094            let len = __tmp.len();
20095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20096        } else {
20097            __tmp.len()
20098        }
20099    }
20100}
20101#[doc = "Request the overall list of mission items from the system/component."]
20102#[doc = ""]
20103#[doc = "ID: 43"]
20104#[derive(Debug, Clone, PartialEq)]
20105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20107#[cfg_attr(feature = "ts", derive(TS))]
20108#[cfg_attr(feature = "ts", ts(export))]
20109pub struct MISSION_REQUEST_LIST_DATA {
20110    #[doc = "System ID"]
20111    pub target_system: u8,
20112    #[doc = "Component ID"]
20113    pub target_component: u8,
20114    #[doc = "Mission type."]
20115    #[cfg_attr(feature = "serde", serde(default))]
20116    pub mission_type: MavMissionType,
20117}
20118impl MISSION_REQUEST_LIST_DATA {
20119    pub const ENCODED_LEN: usize = 3usize;
20120    pub const DEFAULT: Self = Self {
20121        target_system: 0_u8,
20122        target_component: 0_u8,
20123        mission_type: MavMissionType::DEFAULT,
20124    };
20125    #[cfg(feature = "arbitrary")]
20126    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20127        use arbitrary::{Arbitrary, Unstructured};
20128        let mut buf = [0u8; 1024];
20129        rng.fill_bytes(&mut buf);
20130        let mut unstructured = Unstructured::new(&buf);
20131        Self::arbitrary(&mut unstructured).unwrap_or_default()
20132    }
20133}
20134impl Default for MISSION_REQUEST_LIST_DATA {
20135    fn default() -> Self {
20136        Self::DEFAULT.clone()
20137    }
20138}
20139impl MessageData for MISSION_REQUEST_LIST_DATA {
20140    type Message = MavMessage;
20141    const ID: u32 = 43u32;
20142    const NAME: &'static str = "MISSION_REQUEST_LIST";
20143    const EXTRA_CRC: u8 = 132u8;
20144    const ENCODED_LEN: usize = 3usize;
20145    fn deser(
20146        _version: MavlinkVersion,
20147        __input: &[u8],
20148    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20149        let avail_len = __input.len();
20150        let mut payload_buf = [0; Self::ENCODED_LEN];
20151        let mut buf = if avail_len < Self::ENCODED_LEN {
20152            payload_buf[0..avail_len].copy_from_slice(__input);
20153            Bytes::new(&payload_buf)
20154        } else {
20155            Bytes::new(__input)
20156        };
20157        let mut __struct = Self::default();
20158        __struct.target_system = buf.get_u8();
20159        __struct.target_component = buf.get_u8();
20160        let tmp = buf.get_u8();
20161        __struct.mission_type =
20162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20163                enum_type: "MavMissionType",
20164                value: tmp as u32,
20165            })?;
20166        Ok(__struct)
20167    }
20168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20169        let mut __tmp = BytesMut::new(bytes);
20170        #[allow(clippy::absurd_extreme_comparisons)]
20171        #[allow(unused_comparisons)]
20172        if __tmp.remaining() < Self::ENCODED_LEN {
20173            panic!(
20174                "buffer is too small (need {} bytes, but got {})",
20175                Self::ENCODED_LEN,
20176                __tmp.remaining(),
20177            )
20178        }
20179        __tmp.put_u8(self.target_system);
20180        __tmp.put_u8(self.target_component);
20181        if matches!(version, MavlinkVersion::V2) {
20182            __tmp.put_u8(self.mission_type as u8);
20183            let len = __tmp.len();
20184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20185        } else {
20186            __tmp.len()
20187        }
20188    }
20189}
20190#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20191#[doc = ""]
20192#[doc = "ID: 37"]
20193#[derive(Debug, Clone, PartialEq)]
20194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20196#[cfg_attr(feature = "ts", derive(TS))]
20197#[cfg_attr(feature = "ts", ts(export))]
20198pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20199    #[doc = "Start index"]
20200    pub start_index: i16,
20201    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20202    pub end_index: i16,
20203    #[doc = "System ID"]
20204    pub target_system: u8,
20205    #[doc = "Component ID"]
20206    pub target_component: u8,
20207    #[doc = "Mission type."]
20208    #[cfg_attr(feature = "serde", serde(default))]
20209    pub mission_type: MavMissionType,
20210}
20211impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20212    pub const ENCODED_LEN: usize = 7usize;
20213    pub const DEFAULT: Self = Self {
20214        start_index: 0_i16,
20215        end_index: 0_i16,
20216        target_system: 0_u8,
20217        target_component: 0_u8,
20218        mission_type: MavMissionType::DEFAULT,
20219    };
20220    #[cfg(feature = "arbitrary")]
20221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20222        use arbitrary::{Arbitrary, Unstructured};
20223        let mut buf = [0u8; 1024];
20224        rng.fill_bytes(&mut buf);
20225        let mut unstructured = Unstructured::new(&buf);
20226        Self::arbitrary(&mut unstructured).unwrap_or_default()
20227    }
20228}
20229impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20230    fn default() -> Self {
20231        Self::DEFAULT.clone()
20232    }
20233}
20234impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20235    type Message = MavMessage;
20236    const ID: u32 = 37u32;
20237    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20238    const EXTRA_CRC: u8 = 212u8;
20239    const ENCODED_LEN: usize = 7usize;
20240    fn deser(
20241        _version: MavlinkVersion,
20242        __input: &[u8],
20243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20244        let avail_len = __input.len();
20245        let mut payload_buf = [0; Self::ENCODED_LEN];
20246        let mut buf = if avail_len < Self::ENCODED_LEN {
20247            payload_buf[0..avail_len].copy_from_slice(__input);
20248            Bytes::new(&payload_buf)
20249        } else {
20250            Bytes::new(__input)
20251        };
20252        let mut __struct = Self::default();
20253        __struct.start_index = buf.get_i16_le();
20254        __struct.end_index = buf.get_i16_le();
20255        __struct.target_system = buf.get_u8();
20256        __struct.target_component = buf.get_u8();
20257        let tmp = buf.get_u8();
20258        __struct.mission_type =
20259            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20260                enum_type: "MavMissionType",
20261                value: tmp as u32,
20262            })?;
20263        Ok(__struct)
20264    }
20265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20266        let mut __tmp = BytesMut::new(bytes);
20267        #[allow(clippy::absurd_extreme_comparisons)]
20268        #[allow(unused_comparisons)]
20269        if __tmp.remaining() < Self::ENCODED_LEN {
20270            panic!(
20271                "buffer is too small (need {} bytes, but got {})",
20272                Self::ENCODED_LEN,
20273                __tmp.remaining(),
20274            )
20275        }
20276        __tmp.put_i16_le(self.start_index);
20277        __tmp.put_i16_le(self.end_index);
20278        __tmp.put_u8(self.target_system);
20279        __tmp.put_u8(self.target_component);
20280        if matches!(version, MavlinkVersion::V2) {
20281            __tmp.put_u8(self.mission_type as u8);
20282            let len = __tmp.len();
20283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20284        } else {
20285            __tmp.len()
20286        }
20287    }
20288}
20289#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20290#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20291#[doc = ""]
20292#[doc = "ID: 41"]
20293#[derive(Debug, Clone, PartialEq)]
20294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20296#[cfg_attr(feature = "ts", derive(TS))]
20297#[cfg_attr(feature = "ts", ts(export))]
20298pub struct MISSION_SET_CURRENT_DATA {
20299    #[doc = "Sequence"]
20300    pub seq: u16,
20301    #[doc = "System ID"]
20302    pub target_system: u8,
20303    #[doc = "Component ID"]
20304    pub target_component: u8,
20305}
20306impl MISSION_SET_CURRENT_DATA {
20307    pub const ENCODED_LEN: usize = 4usize;
20308    pub const DEFAULT: Self = Self {
20309        seq: 0_u16,
20310        target_system: 0_u8,
20311        target_component: 0_u8,
20312    };
20313    #[cfg(feature = "arbitrary")]
20314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20315        use arbitrary::{Arbitrary, Unstructured};
20316        let mut buf = [0u8; 1024];
20317        rng.fill_bytes(&mut buf);
20318        let mut unstructured = Unstructured::new(&buf);
20319        Self::arbitrary(&mut unstructured).unwrap_or_default()
20320    }
20321}
20322impl Default for MISSION_SET_CURRENT_DATA {
20323    fn default() -> Self {
20324        Self::DEFAULT.clone()
20325    }
20326}
20327impl MessageData for MISSION_SET_CURRENT_DATA {
20328    type Message = MavMessage;
20329    const ID: u32 = 41u32;
20330    const NAME: &'static str = "MISSION_SET_CURRENT";
20331    const EXTRA_CRC: u8 = 28u8;
20332    const ENCODED_LEN: usize = 4usize;
20333    fn deser(
20334        _version: MavlinkVersion,
20335        __input: &[u8],
20336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20337        let avail_len = __input.len();
20338        let mut payload_buf = [0; Self::ENCODED_LEN];
20339        let mut buf = if avail_len < Self::ENCODED_LEN {
20340            payload_buf[0..avail_len].copy_from_slice(__input);
20341            Bytes::new(&payload_buf)
20342        } else {
20343            Bytes::new(__input)
20344        };
20345        let mut __struct = Self::default();
20346        __struct.seq = buf.get_u16_le();
20347        __struct.target_system = buf.get_u8();
20348        __struct.target_component = buf.get_u8();
20349        Ok(__struct)
20350    }
20351    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20352        let mut __tmp = BytesMut::new(bytes);
20353        #[allow(clippy::absurd_extreme_comparisons)]
20354        #[allow(unused_comparisons)]
20355        if __tmp.remaining() < Self::ENCODED_LEN {
20356            panic!(
20357                "buffer is too small (need {} bytes, but got {})",
20358                Self::ENCODED_LEN,
20359                __tmp.remaining(),
20360            )
20361        }
20362        __tmp.put_u16_le(self.seq);
20363        __tmp.put_u8(self.target_system);
20364        __tmp.put_u8(self.target_component);
20365        if matches!(version, MavlinkVersion::V2) {
20366            let len = __tmp.len();
20367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20368        } else {
20369            __tmp.len()
20370        }
20371    }
20372}
20373#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20374#[doc = ""]
20375#[doc = "ID: 38"]
20376#[derive(Debug, Clone, PartialEq)]
20377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20379#[cfg_attr(feature = "ts", derive(TS))]
20380#[cfg_attr(feature = "ts", ts(export))]
20381pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20382    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20383    pub start_index: i16,
20384    #[doc = "End index, equal or greater than start index."]
20385    pub end_index: i16,
20386    #[doc = "System ID"]
20387    pub target_system: u8,
20388    #[doc = "Component ID"]
20389    pub target_component: u8,
20390    #[doc = "Mission type."]
20391    #[cfg_attr(feature = "serde", serde(default))]
20392    pub mission_type: MavMissionType,
20393}
20394impl MISSION_WRITE_PARTIAL_LIST_DATA {
20395    pub const ENCODED_LEN: usize = 7usize;
20396    pub const DEFAULT: Self = Self {
20397        start_index: 0_i16,
20398        end_index: 0_i16,
20399        target_system: 0_u8,
20400        target_component: 0_u8,
20401        mission_type: MavMissionType::DEFAULT,
20402    };
20403    #[cfg(feature = "arbitrary")]
20404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20405        use arbitrary::{Arbitrary, Unstructured};
20406        let mut buf = [0u8; 1024];
20407        rng.fill_bytes(&mut buf);
20408        let mut unstructured = Unstructured::new(&buf);
20409        Self::arbitrary(&mut unstructured).unwrap_or_default()
20410    }
20411}
20412impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20413    fn default() -> Self {
20414        Self::DEFAULT.clone()
20415    }
20416}
20417impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20418    type Message = MavMessage;
20419    const ID: u32 = 38u32;
20420    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20421    const EXTRA_CRC: u8 = 9u8;
20422    const ENCODED_LEN: usize = 7usize;
20423    fn deser(
20424        _version: MavlinkVersion,
20425        __input: &[u8],
20426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20427        let avail_len = __input.len();
20428        let mut payload_buf = [0; Self::ENCODED_LEN];
20429        let mut buf = if avail_len < Self::ENCODED_LEN {
20430            payload_buf[0..avail_len].copy_from_slice(__input);
20431            Bytes::new(&payload_buf)
20432        } else {
20433            Bytes::new(__input)
20434        };
20435        let mut __struct = Self::default();
20436        __struct.start_index = buf.get_i16_le();
20437        __struct.end_index = buf.get_i16_le();
20438        __struct.target_system = buf.get_u8();
20439        __struct.target_component = buf.get_u8();
20440        let tmp = buf.get_u8();
20441        __struct.mission_type =
20442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20443                enum_type: "MavMissionType",
20444                value: tmp as u32,
20445            })?;
20446        Ok(__struct)
20447    }
20448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20449        let mut __tmp = BytesMut::new(bytes);
20450        #[allow(clippy::absurd_extreme_comparisons)]
20451        #[allow(unused_comparisons)]
20452        if __tmp.remaining() < Self::ENCODED_LEN {
20453            panic!(
20454                "buffer is too small (need {} bytes, but got {})",
20455                Self::ENCODED_LEN,
20456                __tmp.remaining(),
20457            )
20458        }
20459        __tmp.put_i16_le(self.start_index);
20460        __tmp.put_i16_le(self.end_index);
20461        __tmp.put_u8(self.target_system);
20462        __tmp.put_u8(self.target_component);
20463        if matches!(version, MavlinkVersion::V2) {
20464            __tmp.put_u8(self.mission_type as u8);
20465            let len = __tmp.len();
20466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20467        } else {
20468            __tmp.len()
20469        }
20470    }
20471}
20472#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20473#[doc = "Orientation of a mount."]
20474#[doc = ""]
20475#[doc = "ID: 265"]
20476#[derive(Debug, Clone, PartialEq)]
20477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20479#[cfg_attr(feature = "ts", derive(TS))]
20480#[cfg_attr(feature = "ts", ts(export))]
20481pub struct MOUNT_ORIENTATION_DATA {
20482    #[doc = "Timestamp (time since system boot)."]
20483    pub time_boot_ms: u32,
20484    #[doc = "Roll in global frame (set to NaN for invalid)."]
20485    pub roll: f32,
20486    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20487    pub pitch: f32,
20488    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20489    pub yaw: f32,
20490    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20491    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20492    pub yaw_absolute: f32,
20493}
20494impl MOUNT_ORIENTATION_DATA {
20495    pub const ENCODED_LEN: usize = 20usize;
20496    pub const DEFAULT: Self = Self {
20497        time_boot_ms: 0_u32,
20498        roll: 0.0_f32,
20499        pitch: 0.0_f32,
20500        yaw: 0.0_f32,
20501        yaw_absolute: 0.0_f32,
20502    };
20503    #[cfg(feature = "arbitrary")]
20504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20505        use arbitrary::{Arbitrary, Unstructured};
20506        let mut buf = [0u8; 1024];
20507        rng.fill_bytes(&mut buf);
20508        let mut unstructured = Unstructured::new(&buf);
20509        Self::arbitrary(&mut unstructured).unwrap_or_default()
20510    }
20511}
20512impl Default for MOUNT_ORIENTATION_DATA {
20513    fn default() -> Self {
20514        Self::DEFAULT.clone()
20515    }
20516}
20517impl MessageData for MOUNT_ORIENTATION_DATA {
20518    type Message = MavMessage;
20519    const ID: u32 = 265u32;
20520    const NAME: &'static str = "MOUNT_ORIENTATION";
20521    const EXTRA_CRC: u8 = 26u8;
20522    const ENCODED_LEN: usize = 20usize;
20523    fn deser(
20524        _version: MavlinkVersion,
20525        __input: &[u8],
20526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20527        let avail_len = __input.len();
20528        let mut payload_buf = [0; Self::ENCODED_LEN];
20529        let mut buf = if avail_len < Self::ENCODED_LEN {
20530            payload_buf[0..avail_len].copy_from_slice(__input);
20531            Bytes::new(&payload_buf)
20532        } else {
20533            Bytes::new(__input)
20534        };
20535        let mut __struct = Self::default();
20536        __struct.time_boot_ms = buf.get_u32_le();
20537        __struct.roll = buf.get_f32_le();
20538        __struct.pitch = buf.get_f32_le();
20539        __struct.yaw = buf.get_f32_le();
20540        __struct.yaw_absolute = buf.get_f32_le();
20541        Ok(__struct)
20542    }
20543    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20544        let mut __tmp = BytesMut::new(bytes);
20545        #[allow(clippy::absurd_extreme_comparisons)]
20546        #[allow(unused_comparisons)]
20547        if __tmp.remaining() < Self::ENCODED_LEN {
20548            panic!(
20549                "buffer is too small (need {} bytes, but got {})",
20550                Self::ENCODED_LEN,
20551                __tmp.remaining(),
20552            )
20553        }
20554        __tmp.put_u32_le(self.time_boot_ms);
20555        __tmp.put_f32_le(self.roll);
20556        __tmp.put_f32_le(self.pitch);
20557        __tmp.put_f32_le(self.yaw);
20558        if matches!(version, MavlinkVersion::V2) {
20559            __tmp.put_f32_le(self.yaw_absolute);
20560            let len = __tmp.len();
20561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20562        } else {
20563            __tmp.len()
20564        }
20565    }
20566}
20567#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20568#[doc = ""]
20569#[doc = "ID: 251"]
20570#[derive(Debug, Clone, PartialEq)]
20571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20573#[cfg_attr(feature = "ts", derive(TS))]
20574#[cfg_attr(feature = "ts", ts(export))]
20575pub struct NAMED_VALUE_FLOAT_DATA {
20576    #[doc = "Timestamp (time since system boot)."]
20577    pub time_boot_ms: u32,
20578    #[doc = "Floating point value"]
20579    pub value: f32,
20580    #[doc = "Name of the debug variable"]
20581    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20582    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20583    pub name: [u8; 10],
20584}
20585impl NAMED_VALUE_FLOAT_DATA {
20586    pub const ENCODED_LEN: usize = 18usize;
20587    pub const DEFAULT: Self = Self {
20588        time_boot_ms: 0_u32,
20589        value: 0.0_f32,
20590        name: [0_u8; 10usize],
20591    };
20592    #[cfg(feature = "arbitrary")]
20593    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20594        use arbitrary::{Arbitrary, Unstructured};
20595        let mut buf = [0u8; 1024];
20596        rng.fill_bytes(&mut buf);
20597        let mut unstructured = Unstructured::new(&buf);
20598        Self::arbitrary(&mut unstructured).unwrap_or_default()
20599    }
20600}
20601impl Default for NAMED_VALUE_FLOAT_DATA {
20602    fn default() -> Self {
20603        Self::DEFAULT.clone()
20604    }
20605}
20606impl MessageData for NAMED_VALUE_FLOAT_DATA {
20607    type Message = MavMessage;
20608    const ID: u32 = 251u32;
20609    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20610    const EXTRA_CRC: u8 = 170u8;
20611    const ENCODED_LEN: usize = 18usize;
20612    fn deser(
20613        _version: MavlinkVersion,
20614        __input: &[u8],
20615    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20616        let avail_len = __input.len();
20617        let mut payload_buf = [0; Self::ENCODED_LEN];
20618        let mut buf = if avail_len < Self::ENCODED_LEN {
20619            payload_buf[0..avail_len].copy_from_slice(__input);
20620            Bytes::new(&payload_buf)
20621        } else {
20622            Bytes::new(__input)
20623        };
20624        let mut __struct = Self::default();
20625        __struct.time_boot_ms = buf.get_u32_le();
20626        __struct.value = buf.get_f32_le();
20627        for v in &mut __struct.name {
20628            let val = buf.get_u8();
20629            *v = val;
20630        }
20631        Ok(__struct)
20632    }
20633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20634        let mut __tmp = BytesMut::new(bytes);
20635        #[allow(clippy::absurd_extreme_comparisons)]
20636        #[allow(unused_comparisons)]
20637        if __tmp.remaining() < Self::ENCODED_LEN {
20638            panic!(
20639                "buffer is too small (need {} bytes, but got {})",
20640                Self::ENCODED_LEN,
20641                __tmp.remaining(),
20642            )
20643        }
20644        __tmp.put_u32_le(self.time_boot_ms);
20645        __tmp.put_f32_le(self.value);
20646        for val in &self.name {
20647            __tmp.put_u8(*val);
20648        }
20649        if matches!(version, MavlinkVersion::V2) {
20650            let len = __tmp.len();
20651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20652        } else {
20653            __tmp.len()
20654        }
20655    }
20656}
20657#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20658#[doc = ""]
20659#[doc = "ID: 252"]
20660#[derive(Debug, Clone, PartialEq)]
20661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20663#[cfg_attr(feature = "ts", derive(TS))]
20664#[cfg_attr(feature = "ts", ts(export))]
20665pub struct NAMED_VALUE_INT_DATA {
20666    #[doc = "Timestamp (time since system boot)."]
20667    pub time_boot_ms: u32,
20668    #[doc = "Signed integer value"]
20669    pub value: i32,
20670    #[doc = "Name of the debug variable"]
20671    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20672    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20673    pub name: [u8; 10],
20674}
20675impl NAMED_VALUE_INT_DATA {
20676    pub const ENCODED_LEN: usize = 18usize;
20677    pub const DEFAULT: Self = Self {
20678        time_boot_ms: 0_u32,
20679        value: 0_i32,
20680        name: [0_u8; 10usize],
20681    };
20682    #[cfg(feature = "arbitrary")]
20683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20684        use arbitrary::{Arbitrary, Unstructured};
20685        let mut buf = [0u8; 1024];
20686        rng.fill_bytes(&mut buf);
20687        let mut unstructured = Unstructured::new(&buf);
20688        Self::arbitrary(&mut unstructured).unwrap_or_default()
20689    }
20690}
20691impl Default for NAMED_VALUE_INT_DATA {
20692    fn default() -> Self {
20693        Self::DEFAULT.clone()
20694    }
20695}
20696impl MessageData for NAMED_VALUE_INT_DATA {
20697    type Message = MavMessage;
20698    const ID: u32 = 252u32;
20699    const NAME: &'static str = "NAMED_VALUE_INT";
20700    const EXTRA_CRC: u8 = 44u8;
20701    const ENCODED_LEN: usize = 18usize;
20702    fn deser(
20703        _version: MavlinkVersion,
20704        __input: &[u8],
20705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20706        let avail_len = __input.len();
20707        let mut payload_buf = [0; Self::ENCODED_LEN];
20708        let mut buf = if avail_len < Self::ENCODED_LEN {
20709            payload_buf[0..avail_len].copy_from_slice(__input);
20710            Bytes::new(&payload_buf)
20711        } else {
20712            Bytes::new(__input)
20713        };
20714        let mut __struct = Self::default();
20715        __struct.time_boot_ms = buf.get_u32_le();
20716        __struct.value = buf.get_i32_le();
20717        for v in &mut __struct.name {
20718            let val = buf.get_u8();
20719            *v = val;
20720        }
20721        Ok(__struct)
20722    }
20723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20724        let mut __tmp = BytesMut::new(bytes);
20725        #[allow(clippy::absurd_extreme_comparisons)]
20726        #[allow(unused_comparisons)]
20727        if __tmp.remaining() < Self::ENCODED_LEN {
20728            panic!(
20729                "buffer is too small (need {} bytes, but got {})",
20730                Self::ENCODED_LEN,
20731                __tmp.remaining(),
20732            )
20733        }
20734        __tmp.put_u32_le(self.time_boot_ms);
20735        __tmp.put_i32_le(self.value);
20736        for val in &self.name {
20737            __tmp.put_u8(*val);
20738        }
20739        if matches!(version, MavlinkVersion::V2) {
20740            let len = __tmp.len();
20741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20742        } else {
20743            __tmp.len()
20744        }
20745    }
20746}
20747#[doc = "The state of the navigation and position controller."]
20748#[doc = ""]
20749#[doc = "ID: 62"]
20750#[derive(Debug, Clone, PartialEq)]
20751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20753#[cfg_attr(feature = "ts", derive(TS))]
20754#[cfg_attr(feature = "ts", ts(export))]
20755pub struct NAV_CONTROLLER_OUTPUT_DATA {
20756    #[doc = "Current desired roll"]
20757    pub nav_roll: f32,
20758    #[doc = "Current desired pitch"]
20759    pub nav_pitch: f32,
20760    #[doc = "Current altitude error"]
20761    pub alt_error: f32,
20762    #[doc = "Current airspeed error"]
20763    pub aspd_error: f32,
20764    #[doc = "Current crosstrack error on x-y plane"]
20765    pub xtrack_error: f32,
20766    #[doc = "Current desired heading"]
20767    pub nav_bearing: i16,
20768    #[doc = "Bearing to current waypoint/target"]
20769    pub target_bearing: i16,
20770    #[doc = "Distance to active waypoint"]
20771    pub wp_dist: u16,
20772}
20773impl NAV_CONTROLLER_OUTPUT_DATA {
20774    pub const ENCODED_LEN: usize = 26usize;
20775    pub const DEFAULT: Self = Self {
20776        nav_roll: 0.0_f32,
20777        nav_pitch: 0.0_f32,
20778        alt_error: 0.0_f32,
20779        aspd_error: 0.0_f32,
20780        xtrack_error: 0.0_f32,
20781        nav_bearing: 0_i16,
20782        target_bearing: 0_i16,
20783        wp_dist: 0_u16,
20784    };
20785    #[cfg(feature = "arbitrary")]
20786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20787        use arbitrary::{Arbitrary, Unstructured};
20788        let mut buf = [0u8; 1024];
20789        rng.fill_bytes(&mut buf);
20790        let mut unstructured = Unstructured::new(&buf);
20791        Self::arbitrary(&mut unstructured).unwrap_or_default()
20792    }
20793}
20794impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20795    fn default() -> Self {
20796        Self::DEFAULT.clone()
20797    }
20798}
20799impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20800    type Message = MavMessage;
20801    const ID: u32 = 62u32;
20802    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20803    const EXTRA_CRC: u8 = 183u8;
20804    const ENCODED_LEN: usize = 26usize;
20805    fn deser(
20806        _version: MavlinkVersion,
20807        __input: &[u8],
20808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20809        let avail_len = __input.len();
20810        let mut payload_buf = [0; Self::ENCODED_LEN];
20811        let mut buf = if avail_len < Self::ENCODED_LEN {
20812            payload_buf[0..avail_len].copy_from_slice(__input);
20813            Bytes::new(&payload_buf)
20814        } else {
20815            Bytes::new(__input)
20816        };
20817        let mut __struct = Self::default();
20818        __struct.nav_roll = buf.get_f32_le();
20819        __struct.nav_pitch = buf.get_f32_le();
20820        __struct.alt_error = buf.get_f32_le();
20821        __struct.aspd_error = buf.get_f32_le();
20822        __struct.xtrack_error = buf.get_f32_le();
20823        __struct.nav_bearing = buf.get_i16_le();
20824        __struct.target_bearing = buf.get_i16_le();
20825        __struct.wp_dist = buf.get_u16_le();
20826        Ok(__struct)
20827    }
20828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20829        let mut __tmp = BytesMut::new(bytes);
20830        #[allow(clippy::absurd_extreme_comparisons)]
20831        #[allow(unused_comparisons)]
20832        if __tmp.remaining() < Self::ENCODED_LEN {
20833            panic!(
20834                "buffer is too small (need {} bytes, but got {})",
20835                Self::ENCODED_LEN,
20836                __tmp.remaining(),
20837            )
20838        }
20839        __tmp.put_f32_le(self.nav_roll);
20840        __tmp.put_f32_le(self.nav_pitch);
20841        __tmp.put_f32_le(self.alt_error);
20842        __tmp.put_f32_le(self.aspd_error);
20843        __tmp.put_f32_le(self.xtrack_error);
20844        __tmp.put_i16_le(self.nav_bearing);
20845        __tmp.put_i16_le(self.target_bearing);
20846        __tmp.put_u16_le(self.wp_dist);
20847        if matches!(version, MavlinkVersion::V2) {
20848            let len = __tmp.len();
20849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20850        } else {
20851            __tmp.len()
20852        }
20853    }
20854}
20855#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20856#[doc = ""]
20857#[doc = "ID: 330"]
20858#[derive(Debug, Clone, PartialEq)]
20859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20861#[cfg_attr(feature = "ts", derive(TS))]
20862#[cfg_attr(feature = "ts", ts(export))]
20863pub struct OBSTACLE_DISTANCE_DATA {
20864    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20865    pub time_usec: u64,
20866    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20867    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20868    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20869    pub distances: [u16; 72],
20870    #[doc = "Minimum distance the sensor can measure."]
20871    pub min_distance: u16,
20872    #[doc = "Maximum distance the sensor can measure."]
20873    pub max_distance: u16,
20874    #[doc = "Class id of the distance sensor type."]
20875    pub sensor_type: MavDistanceSensor,
20876    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20877    pub increment: u8,
20878    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20880    pub increment_f: f32,
20881    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20883    pub angle_offset: f32,
20884    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20885    #[cfg_attr(feature = "serde", serde(default))]
20886    pub frame: MavFrame,
20887}
20888impl OBSTACLE_DISTANCE_DATA {
20889    pub const ENCODED_LEN: usize = 167usize;
20890    pub const DEFAULT: Self = Self {
20891        time_usec: 0_u64,
20892        distances: [0_u16; 72usize],
20893        min_distance: 0_u16,
20894        max_distance: 0_u16,
20895        sensor_type: MavDistanceSensor::DEFAULT,
20896        increment: 0_u8,
20897        increment_f: 0.0_f32,
20898        angle_offset: 0.0_f32,
20899        frame: MavFrame::DEFAULT,
20900    };
20901    #[cfg(feature = "arbitrary")]
20902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20903        use arbitrary::{Arbitrary, Unstructured};
20904        let mut buf = [0u8; 1024];
20905        rng.fill_bytes(&mut buf);
20906        let mut unstructured = Unstructured::new(&buf);
20907        Self::arbitrary(&mut unstructured).unwrap_or_default()
20908    }
20909}
20910impl Default for OBSTACLE_DISTANCE_DATA {
20911    fn default() -> Self {
20912        Self::DEFAULT.clone()
20913    }
20914}
20915impl MessageData for OBSTACLE_DISTANCE_DATA {
20916    type Message = MavMessage;
20917    const ID: u32 = 330u32;
20918    const NAME: &'static str = "OBSTACLE_DISTANCE";
20919    const EXTRA_CRC: u8 = 23u8;
20920    const ENCODED_LEN: usize = 167usize;
20921    fn deser(
20922        _version: MavlinkVersion,
20923        __input: &[u8],
20924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20925        let avail_len = __input.len();
20926        let mut payload_buf = [0; Self::ENCODED_LEN];
20927        let mut buf = if avail_len < Self::ENCODED_LEN {
20928            payload_buf[0..avail_len].copy_from_slice(__input);
20929            Bytes::new(&payload_buf)
20930        } else {
20931            Bytes::new(__input)
20932        };
20933        let mut __struct = Self::default();
20934        __struct.time_usec = buf.get_u64_le();
20935        for v in &mut __struct.distances {
20936            let val = buf.get_u16_le();
20937            *v = val;
20938        }
20939        __struct.min_distance = buf.get_u16_le();
20940        __struct.max_distance = buf.get_u16_le();
20941        let tmp = buf.get_u8();
20942        __struct.sensor_type =
20943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20944                enum_type: "MavDistanceSensor",
20945                value: tmp as u32,
20946            })?;
20947        __struct.increment = buf.get_u8();
20948        __struct.increment_f = buf.get_f32_le();
20949        __struct.angle_offset = buf.get_f32_le();
20950        let tmp = buf.get_u8();
20951        __struct.frame =
20952            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20953                enum_type: "MavFrame",
20954                value: tmp as u32,
20955            })?;
20956        Ok(__struct)
20957    }
20958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20959        let mut __tmp = BytesMut::new(bytes);
20960        #[allow(clippy::absurd_extreme_comparisons)]
20961        #[allow(unused_comparisons)]
20962        if __tmp.remaining() < Self::ENCODED_LEN {
20963            panic!(
20964                "buffer is too small (need {} bytes, but got {})",
20965                Self::ENCODED_LEN,
20966                __tmp.remaining(),
20967            )
20968        }
20969        __tmp.put_u64_le(self.time_usec);
20970        for val in &self.distances {
20971            __tmp.put_u16_le(*val);
20972        }
20973        __tmp.put_u16_le(self.min_distance);
20974        __tmp.put_u16_le(self.max_distance);
20975        __tmp.put_u8(self.sensor_type as u8);
20976        __tmp.put_u8(self.increment);
20977        if matches!(version, MavlinkVersion::V2) {
20978            __tmp.put_f32_le(self.increment_f);
20979            __tmp.put_f32_le(self.angle_offset);
20980            __tmp.put_u8(self.frame as u8);
20981            let len = __tmp.len();
20982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20983        } else {
20984            __tmp.len()
20985        }
20986    }
20987}
20988#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20989#[doc = ""]
20990#[doc = "ID: 331"]
20991#[derive(Debug, Clone, PartialEq)]
20992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20994#[cfg_attr(feature = "ts", derive(TS))]
20995#[cfg_attr(feature = "ts", ts(export))]
20996pub struct ODOMETRY_DATA {
20997    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20998    pub time_usec: u64,
20999    #[doc = "X Position"]
21000    pub x: f32,
21001    #[doc = "Y Position"]
21002    pub y: f32,
21003    #[doc = "Z Position"]
21004    pub z: f32,
21005    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21008    pub q: [f32; 4],
21009    #[doc = "X linear speed"]
21010    pub vx: f32,
21011    #[doc = "Y linear speed"]
21012    pub vy: f32,
21013    #[doc = "Z linear speed"]
21014    pub vz: f32,
21015    #[doc = "Roll angular speed"]
21016    pub rollspeed: f32,
21017    #[doc = "Pitch angular speed"]
21018    pub pitchspeed: f32,
21019    #[doc = "Yaw angular speed"]
21020    pub yawspeed: f32,
21021    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21022    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21023    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21024    pub pose_covariance: [f32; 21],
21025    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21026    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21027    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21028    pub velocity_covariance: [f32; 21],
21029    #[doc = "Coordinate frame of reference for the pose data."]
21030    pub frame_id: MavFrame,
21031    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21032    pub child_frame_id: MavFrame,
21033    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21034    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21035    pub reset_counter: u8,
21036    #[doc = "Type of estimator that is providing the odometry."]
21037    #[cfg_attr(feature = "serde", serde(default))]
21038    pub estimator_type: MavEstimatorType,
21039    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21040    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21041    pub quality: i8,
21042}
21043impl ODOMETRY_DATA {
21044    pub const ENCODED_LEN: usize = 233usize;
21045    pub const DEFAULT: Self = Self {
21046        time_usec: 0_u64,
21047        x: 0.0_f32,
21048        y: 0.0_f32,
21049        z: 0.0_f32,
21050        q: [0.0_f32; 4usize],
21051        vx: 0.0_f32,
21052        vy: 0.0_f32,
21053        vz: 0.0_f32,
21054        rollspeed: 0.0_f32,
21055        pitchspeed: 0.0_f32,
21056        yawspeed: 0.0_f32,
21057        pose_covariance: [0.0_f32; 21usize],
21058        velocity_covariance: [0.0_f32; 21usize],
21059        frame_id: MavFrame::DEFAULT,
21060        child_frame_id: MavFrame::DEFAULT,
21061        reset_counter: 0_u8,
21062        estimator_type: MavEstimatorType::DEFAULT,
21063        quality: 0_i8,
21064    };
21065    #[cfg(feature = "arbitrary")]
21066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21067        use arbitrary::{Arbitrary, Unstructured};
21068        let mut buf = [0u8; 1024];
21069        rng.fill_bytes(&mut buf);
21070        let mut unstructured = Unstructured::new(&buf);
21071        Self::arbitrary(&mut unstructured).unwrap_or_default()
21072    }
21073}
21074impl Default for ODOMETRY_DATA {
21075    fn default() -> Self {
21076        Self::DEFAULT.clone()
21077    }
21078}
21079impl MessageData for ODOMETRY_DATA {
21080    type Message = MavMessage;
21081    const ID: u32 = 331u32;
21082    const NAME: &'static str = "ODOMETRY";
21083    const EXTRA_CRC: u8 = 91u8;
21084    const ENCODED_LEN: usize = 233usize;
21085    fn deser(
21086        _version: MavlinkVersion,
21087        __input: &[u8],
21088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21089        let avail_len = __input.len();
21090        let mut payload_buf = [0; Self::ENCODED_LEN];
21091        let mut buf = if avail_len < Self::ENCODED_LEN {
21092            payload_buf[0..avail_len].copy_from_slice(__input);
21093            Bytes::new(&payload_buf)
21094        } else {
21095            Bytes::new(__input)
21096        };
21097        let mut __struct = Self::default();
21098        __struct.time_usec = buf.get_u64_le();
21099        __struct.x = buf.get_f32_le();
21100        __struct.y = buf.get_f32_le();
21101        __struct.z = buf.get_f32_le();
21102        for v in &mut __struct.q {
21103            let val = buf.get_f32_le();
21104            *v = val;
21105        }
21106        __struct.vx = buf.get_f32_le();
21107        __struct.vy = buf.get_f32_le();
21108        __struct.vz = buf.get_f32_le();
21109        __struct.rollspeed = buf.get_f32_le();
21110        __struct.pitchspeed = buf.get_f32_le();
21111        __struct.yawspeed = buf.get_f32_le();
21112        for v in &mut __struct.pose_covariance {
21113            let val = buf.get_f32_le();
21114            *v = val;
21115        }
21116        for v in &mut __struct.velocity_covariance {
21117            let val = buf.get_f32_le();
21118            *v = val;
21119        }
21120        let tmp = buf.get_u8();
21121        __struct.frame_id =
21122            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21123                enum_type: "MavFrame",
21124                value: tmp as u32,
21125            })?;
21126        let tmp = buf.get_u8();
21127        __struct.child_frame_id =
21128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21129                enum_type: "MavFrame",
21130                value: tmp as u32,
21131            })?;
21132        __struct.reset_counter = buf.get_u8();
21133        let tmp = buf.get_u8();
21134        __struct.estimator_type =
21135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21136                enum_type: "MavEstimatorType",
21137                value: tmp as u32,
21138            })?;
21139        __struct.quality = buf.get_i8();
21140        Ok(__struct)
21141    }
21142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21143        let mut __tmp = BytesMut::new(bytes);
21144        #[allow(clippy::absurd_extreme_comparisons)]
21145        #[allow(unused_comparisons)]
21146        if __tmp.remaining() < Self::ENCODED_LEN {
21147            panic!(
21148                "buffer is too small (need {} bytes, but got {})",
21149                Self::ENCODED_LEN,
21150                __tmp.remaining(),
21151            )
21152        }
21153        __tmp.put_u64_le(self.time_usec);
21154        __tmp.put_f32_le(self.x);
21155        __tmp.put_f32_le(self.y);
21156        __tmp.put_f32_le(self.z);
21157        for val in &self.q {
21158            __tmp.put_f32_le(*val);
21159        }
21160        __tmp.put_f32_le(self.vx);
21161        __tmp.put_f32_le(self.vy);
21162        __tmp.put_f32_le(self.vz);
21163        __tmp.put_f32_le(self.rollspeed);
21164        __tmp.put_f32_le(self.pitchspeed);
21165        __tmp.put_f32_le(self.yawspeed);
21166        for val in &self.pose_covariance {
21167            __tmp.put_f32_le(*val);
21168        }
21169        for val in &self.velocity_covariance {
21170            __tmp.put_f32_le(*val);
21171        }
21172        __tmp.put_u8(self.frame_id as u8);
21173        __tmp.put_u8(self.child_frame_id as u8);
21174        if matches!(version, MavlinkVersion::V2) {
21175            __tmp.put_u8(self.reset_counter);
21176            __tmp.put_u8(self.estimator_type as u8);
21177            __tmp.put_i8(self.quality);
21178            let len = __tmp.len();
21179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21180        } else {
21181            __tmp.len()
21182        }
21183    }
21184}
21185#[doc = "Hardware status sent by an onboard computer."]
21186#[doc = ""]
21187#[doc = "ID: 390"]
21188#[derive(Debug, Clone, PartialEq)]
21189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21191#[cfg_attr(feature = "ts", derive(TS))]
21192#[cfg_attr(feature = "ts", ts(export))]
21193pub struct ONBOARD_COMPUTER_STATUS_DATA {
21194    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21195    pub time_usec: u64,
21196    #[doc = "Time since system boot."]
21197    pub uptime: u32,
21198    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21199    pub ram_usage: u32,
21200    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21201    pub ram_total: u32,
21202    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21203    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21204    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21205    pub storage_type: [u32; 4],
21206    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21207    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21208    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21209    pub storage_usage: [u32; 4],
21210    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21212    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21213    pub storage_total: [u32; 4],
21214    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21217    pub link_type: [u32; 6],
21218    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21219    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21220    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21221    pub link_tx_rate: [u32; 6],
21222    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21223    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21224    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21225    pub link_rx_rate: [u32; 6],
21226    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21228    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21229    pub link_tx_max: [u32; 6],
21230    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21231    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21232    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21233    pub link_rx_max: [u32; 6],
21234    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21235    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21236    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21237    pub fan_speed: [i16; 4],
21238    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21239    pub mavtype: u8,
21240    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21242    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21243    pub cpu_cores: [u8; 8],
21244    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21245    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21246    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21247    pub cpu_combined: [u8; 10],
21248    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21250    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21251    pub gpu_cores: [u8; 4],
21252    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21253    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21254    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21255    pub gpu_combined: [u8; 10],
21256    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21257    pub temperature_board: i8,
21258    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21260    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21261    pub temperature_core: [i8; 8],
21262}
21263impl ONBOARD_COMPUTER_STATUS_DATA {
21264    pub const ENCODED_LEN: usize = 238usize;
21265    pub const DEFAULT: Self = Self {
21266        time_usec: 0_u64,
21267        uptime: 0_u32,
21268        ram_usage: 0_u32,
21269        ram_total: 0_u32,
21270        storage_type: [0_u32; 4usize],
21271        storage_usage: [0_u32; 4usize],
21272        storage_total: [0_u32; 4usize],
21273        link_type: [0_u32; 6usize],
21274        link_tx_rate: [0_u32; 6usize],
21275        link_rx_rate: [0_u32; 6usize],
21276        link_tx_max: [0_u32; 6usize],
21277        link_rx_max: [0_u32; 6usize],
21278        fan_speed: [0_i16; 4usize],
21279        mavtype: 0_u8,
21280        cpu_cores: [0_u8; 8usize],
21281        cpu_combined: [0_u8; 10usize],
21282        gpu_cores: [0_u8; 4usize],
21283        gpu_combined: [0_u8; 10usize],
21284        temperature_board: 0_i8,
21285        temperature_core: [0_i8; 8usize],
21286    };
21287    #[cfg(feature = "arbitrary")]
21288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21289        use arbitrary::{Arbitrary, Unstructured};
21290        let mut buf = [0u8; 1024];
21291        rng.fill_bytes(&mut buf);
21292        let mut unstructured = Unstructured::new(&buf);
21293        Self::arbitrary(&mut unstructured).unwrap_or_default()
21294    }
21295}
21296impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21297    fn default() -> Self {
21298        Self::DEFAULT.clone()
21299    }
21300}
21301impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21302    type Message = MavMessage;
21303    const ID: u32 = 390u32;
21304    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21305    const EXTRA_CRC: u8 = 156u8;
21306    const ENCODED_LEN: usize = 238usize;
21307    fn deser(
21308        _version: MavlinkVersion,
21309        __input: &[u8],
21310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21311        let avail_len = __input.len();
21312        let mut payload_buf = [0; Self::ENCODED_LEN];
21313        let mut buf = if avail_len < Self::ENCODED_LEN {
21314            payload_buf[0..avail_len].copy_from_slice(__input);
21315            Bytes::new(&payload_buf)
21316        } else {
21317            Bytes::new(__input)
21318        };
21319        let mut __struct = Self::default();
21320        __struct.time_usec = buf.get_u64_le();
21321        __struct.uptime = buf.get_u32_le();
21322        __struct.ram_usage = buf.get_u32_le();
21323        __struct.ram_total = buf.get_u32_le();
21324        for v in &mut __struct.storage_type {
21325            let val = buf.get_u32_le();
21326            *v = val;
21327        }
21328        for v in &mut __struct.storage_usage {
21329            let val = buf.get_u32_le();
21330            *v = val;
21331        }
21332        for v in &mut __struct.storage_total {
21333            let val = buf.get_u32_le();
21334            *v = val;
21335        }
21336        for v in &mut __struct.link_type {
21337            let val = buf.get_u32_le();
21338            *v = val;
21339        }
21340        for v in &mut __struct.link_tx_rate {
21341            let val = buf.get_u32_le();
21342            *v = val;
21343        }
21344        for v in &mut __struct.link_rx_rate {
21345            let val = buf.get_u32_le();
21346            *v = val;
21347        }
21348        for v in &mut __struct.link_tx_max {
21349            let val = buf.get_u32_le();
21350            *v = val;
21351        }
21352        for v in &mut __struct.link_rx_max {
21353            let val = buf.get_u32_le();
21354            *v = val;
21355        }
21356        for v in &mut __struct.fan_speed {
21357            let val = buf.get_i16_le();
21358            *v = val;
21359        }
21360        __struct.mavtype = buf.get_u8();
21361        for v in &mut __struct.cpu_cores {
21362            let val = buf.get_u8();
21363            *v = val;
21364        }
21365        for v in &mut __struct.cpu_combined {
21366            let val = buf.get_u8();
21367            *v = val;
21368        }
21369        for v in &mut __struct.gpu_cores {
21370            let val = buf.get_u8();
21371            *v = val;
21372        }
21373        for v in &mut __struct.gpu_combined {
21374            let val = buf.get_u8();
21375            *v = val;
21376        }
21377        __struct.temperature_board = buf.get_i8();
21378        for v in &mut __struct.temperature_core {
21379            let val = buf.get_i8();
21380            *v = val;
21381        }
21382        Ok(__struct)
21383    }
21384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21385        let mut __tmp = BytesMut::new(bytes);
21386        #[allow(clippy::absurd_extreme_comparisons)]
21387        #[allow(unused_comparisons)]
21388        if __tmp.remaining() < Self::ENCODED_LEN {
21389            panic!(
21390                "buffer is too small (need {} bytes, but got {})",
21391                Self::ENCODED_LEN,
21392                __tmp.remaining(),
21393            )
21394        }
21395        __tmp.put_u64_le(self.time_usec);
21396        __tmp.put_u32_le(self.uptime);
21397        __tmp.put_u32_le(self.ram_usage);
21398        __tmp.put_u32_le(self.ram_total);
21399        for val in &self.storage_type {
21400            __tmp.put_u32_le(*val);
21401        }
21402        for val in &self.storage_usage {
21403            __tmp.put_u32_le(*val);
21404        }
21405        for val in &self.storage_total {
21406            __tmp.put_u32_le(*val);
21407        }
21408        for val in &self.link_type {
21409            __tmp.put_u32_le(*val);
21410        }
21411        for val in &self.link_tx_rate {
21412            __tmp.put_u32_le(*val);
21413        }
21414        for val in &self.link_rx_rate {
21415            __tmp.put_u32_le(*val);
21416        }
21417        for val in &self.link_tx_max {
21418            __tmp.put_u32_le(*val);
21419        }
21420        for val in &self.link_rx_max {
21421            __tmp.put_u32_le(*val);
21422        }
21423        for val in &self.fan_speed {
21424            __tmp.put_i16_le(*val);
21425        }
21426        __tmp.put_u8(self.mavtype);
21427        for val in &self.cpu_cores {
21428            __tmp.put_u8(*val);
21429        }
21430        for val in &self.cpu_combined {
21431            __tmp.put_u8(*val);
21432        }
21433        for val in &self.gpu_cores {
21434            __tmp.put_u8(*val);
21435        }
21436        for val in &self.gpu_combined {
21437            __tmp.put_u8(*val);
21438        }
21439        __tmp.put_i8(self.temperature_board);
21440        for val in &self.temperature_core {
21441            __tmp.put_i8(*val);
21442        }
21443        if matches!(version, MavlinkVersion::V2) {
21444            let len = __tmp.len();
21445            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21446        } else {
21447            __tmp.len()
21448        }
21449    }
21450}
21451#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21452#[doc = ""]
21453#[doc = "ID: 12918"]
21454#[derive(Debug, Clone, PartialEq)]
21455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21457#[cfg_attr(feature = "ts", derive(TS))]
21458#[cfg_attr(feature = "ts", ts(export))]
21459pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21460    #[doc = "Status level indicating if arming is allowed."]
21461    pub status: MavOdidArmStatus,
21462    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21464    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21465    pub error: [u8; 50],
21466}
21467impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21468    pub const ENCODED_LEN: usize = 51usize;
21469    pub const DEFAULT: Self = Self {
21470        status: MavOdidArmStatus::DEFAULT,
21471        error: [0_u8; 50usize],
21472    };
21473    #[cfg(feature = "arbitrary")]
21474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21475        use arbitrary::{Arbitrary, Unstructured};
21476        let mut buf = [0u8; 1024];
21477        rng.fill_bytes(&mut buf);
21478        let mut unstructured = Unstructured::new(&buf);
21479        Self::arbitrary(&mut unstructured).unwrap_or_default()
21480    }
21481}
21482impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21483    fn default() -> Self {
21484        Self::DEFAULT.clone()
21485    }
21486}
21487impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21488    type Message = MavMessage;
21489    const ID: u32 = 12918u32;
21490    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21491    const EXTRA_CRC: u8 = 139u8;
21492    const ENCODED_LEN: usize = 51usize;
21493    fn deser(
21494        _version: MavlinkVersion,
21495        __input: &[u8],
21496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21497        let avail_len = __input.len();
21498        let mut payload_buf = [0; Self::ENCODED_LEN];
21499        let mut buf = if avail_len < Self::ENCODED_LEN {
21500            payload_buf[0..avail_len].copy_from_slice(__input);
21501            Bytes::new(&payload_buf)
21502        } else {
21503            Bytes::new(__input)
21504        };
21505        let mut __struct = Self::default();
21506        let tmp = buf.get_u8();
21507        __struct.status =
21508            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21509                enum_type: "MavOdidArmStatus",
21510                value: tmp as u32,
21511            })?;
21512        for v in &mut __struct.error {
21513            let val = buf.get_u8();
21514            *v = val;
21515        }
21516        Ok(__struct)
21517    }
21518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21519        let mut __tmp = BytesMut::new(bytes);
21520        #[allow(clippy::absurd_extreme_comparisons)]
21521        #[allow(unused_comparisons)]
21522        if __tmp.remaining() < Self::ENCODED_LEN {
21523            panic!(
21524                "buffer is too small (need {} bytes, but got {})",
21525                Self::ENCODED_LEN,
21526                __tmp.remaining(),
21527            )
21528        }
21529        __tmp.put_u8(self.status as u8);
21530        for val in &self.error {
21531            __tmp.put_u8(*val);
21532        }
21533        if matches!(version, MavlinkVersion::V2) {
21534            let len = __tmp.len();
21535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21536        } else {
21537            __tmp.len()
21538        }
21539    }
21540}
21541#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21542#[doc = ""]
21543#[doc = "ID: 12902"]
21544#[derive(Debug, Clone, PartialEq)]
21545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21547#[cfg_attr(feature = "ts", derive(TS))]
21548#[cfg_attr(feature = "ts", ts(export))]
21549pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21550    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21551    pub timestamp: u32,
21552    #[doc = "System ID (0 for broadcast)."]
21553    pub target_system: u8,
21554    #[doc = "Component ID (0 for broadcast)."]
21555    pub target_component: u8,
21556    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21557    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21558    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21559    pub id_or_mac: [u8; 20],
21560    #[doc = "Indicates the type of authentication."]
21561    pub authentication_type: MavOdidAuthType,
21562    #[doc = "Allowed range is 0 - 15."]
21563    pub data_page: u8,
21564    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21565    pub last_page_index: u8,
21566    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21567    pub length: u8,
21568    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21569    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21570    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21571    pub authentication_data: [u8; 23],
21572}
21573impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21574    pub const ENCODED_LEN: usize = 53usize;
21575    pub const DEFAULT: Self = Self {
21576        timestamp: 0_u32,
21577        target_system: 0_u8,
21578        target_component: 0_u8,
21579        id_or_mac: [0_u8; 20usize],
21580        authentication_type: MavOdidAuthType::DEFAULT,
21581        data_page: 0_u8,
21582        last_page_index: 0_u8,
21583        length: 0_u8,
21584        authentication_data: [0_u8; 23usize],
21585    };
21586    #[cfg(feature = "arbitrary")]
21587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21588        use arbitrary::{Arbitrary, Unstructured};
21589        let mut buf = [0u8; 1024];
21590        rng.fill_bytes(&mut buf);
21591        let mut unstructured = Unstructured::new(&buf);
21592        Self::arbitrary(&mut unstructured).unwrap_or_default()
21593    }
21594}
21595impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21596    fn default() -> Self {
21597        Self::DEFAULT.clone()
21598    }
21599}
21600impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21601    type Message = MavMessage;
21602    const ID: u32 = 12902u32;
21603    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21604    const EXTRA_CRC: u8 = 140u8;
21605    const ENCODED_LEN: usize = 53usize;
21606    fn deser(
21607        _version: MavlinkVersion,
21608        __input: &[u8],
21609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21610        let avail_len = __input.len();
21611        let mut payload_buf = [0; Self::ENCODED_LEN];
21612        let mut buf = if avail_len < Self::ENCODED_LEN {
21613            payload_buf[0..avail_len].copy_from_slice(__input);
21614            Bytes::new(&payload_buf)
21615        } else {
21616            Bytes::new(__input)
21617        };
21618        let mut __struct = Self::default();
21619        __struct.timestamp = buf.get_u32_le();
21620        __struct.target_system = buf.get_u8();
21621        __struct.target_component = buf.get_u8();
21622        for v in &mut __struct.id_or_mac {
21623            let val = buf.get_u8();
21624            *v = val;
21625        }
21626        let tmp = buf.get_u8();
21627        __struct.authentication_type =
21628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21629                enum_type: "MavOdidAuthType",
21630                value: tmp as u32,
21631            })?;
21632        __struct.data_page = buf.get_u8();
21633        __struct.last_page_index = buf.get_u8();
21634        __struct.length = buf.get_u8();
21635        for v in &mut __struct.authentication_data {
21636            let val = buf.get_u8();
21637            *v = val;
21638        }
21639        Ok(__struct)
21640    }
21641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21642        let mut __tmp = BytesMut::new(bytes);
21643        #[allow(clippy::absurd_extreme_comparisons)]
21644        #[allow(unused_comparisons)]
21645        if __tmp.remaining() < Self::ENCODED_LEN {
21646            panic!(
21647                "buffer is too small (need {} bytes, but got {})",
21648                Self::ENCODED_LEN,
21649                __tmp.remaining(),
21650            )
21651        }
21652        __tmp.put_u32_le(self.timestamp);
21653        __tmp.put_u8(self.target_system);
21654        __tmp.put_u8(self.target_component);
21655        for val in &self.id_or_mac {
21656            __tmp.put_u8(*val);
21657        }
21658        __tmp.put_u8(self.authentication_type as u8);
21659        __tmp.put_u8(self.data_page);
21660        __tmp.put_u8(self.last_page_index);
21661        __tmp.put_u8(self.length);
21662        for val in &self.authentication_data {
21663            __tmp.put_u8(*val);
21664        }
21665        if matches!(version, MavlinkVersion::V2) {
21666            let len = __tmp.len();
21667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21668        } else {
21669            __tmp.len()
21670        }
21671    }
21672}
21673#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21674#[doc = ""]
21675#[doc = "ID: 12900"]
21676#[derive(Debug, Clone, PartialEq)]
21677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21679#[cfg_attr(feature = "ts", derive(TS))]
21680#[cfg_attr(feature = "ts", ts(export))]
21681pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21682    #[doc = "System ID (0 for broadcast)."]
21683    pub target_system: u8,
21684    #[doc = "Component ID (0 for broadcast)."]
21685    pub target_component: u8,
21686    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21689    pub id_or_mac: [u8; 20],
21690    #[doc = "Indicates the format for the uas_id field of this message."]
21691    pub id_type: MavOdidIdType,
21692    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21693    pub ua_type: MavOdidUaType,
21694    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21695    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21696    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21697    pub uas_id: [u8; 20],
21698}
21699impl OPEN_DRONE_ID_BASIC_ID_DATA {
21700    pub const ENCODED_LEN: usize = 44usize;
21701    pub const DEFAULT: Self = Self {
21702        target_system: 0_u8,
21703        target_component: 0_u8,
21704        id_or_mac: [0_u8; 20usize],
21705        id_type: MavOdidIdType::DEFAULT,
21706        ua_type: MavOdidUaType::DEFAULT,
21707        uas_id: [0_u8; 20usize],
21708    };
21709    #[cfg(feature = "arbitrary")]
21710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21711        use arbitrary::{Arbitrary, Unstructured};
21712        let mut buf = [0u8; 1024];
21713        rng.fill_bytes(&mut buf);
21714        let mut unstructured = Unstructured::new(&buf);
21715        Self::arbitrary(&mut unstructured).unwrap_or_default()
21716    }
21717}
21718impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21719    fn default() -> Self {
21720        Self::DEFAULT.clone()
21721    }
21722}
21723impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21724    type Message = MavMessage;
21725    const ID: u32 = 12900u32;
21726    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21727    const EXTRA_CRC: u8 = 114u8;
21728    const ENCODED_LEN: usize = 44usize;
21729    fn deser(
21730        _version: MavlinkVersion,
21731        __input: &[u8],
21732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21733        let avail_len = __input.len();
21734        let mut payload_buf = [0; Self::ENCODED_LEN];
21735        let mut buf = if avail_len < Self::ENCODED_LEN {
21736            payload_buf[0..avail_len].copy_from_slice(__input);
21737            Bytes::new(&payload_buf)
21738        } else {
21739            Bytes::new(__input)
21740        };
21741        let mut __struct = Self::default();
21742        __struct.target_system = buf.get_u8();
21743        __struct.target_component = buf.get_u8();
21744        for v in &mut __struct.id_or_mac {
21745            let val = buf.get_u8();
21746            *v = val;
21747        }
21748        let tmp = buf.get_u8();
21749        __struct.id_type =
21750            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21751                enum_type: "MavOdidIdType",
21752                value: tmp as u32,
21753            })?;
21754        let tmp = buf.get_u8();
21755        __struct.ua_type =
21756            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21757                enum_type: "MavOdidUaType",
21758                value: tmp as u32,
21759            })?;
21760        for v in &mut __struct.uas_id {
21761            let val = buf.get_u8();
21762            *v = val;
21763        }
21764        Ok(__struct)
21765    }
21766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21767        let mut __tmp = BytesMut::new(bytes);
21768        #[allow(clippy::absurd_extreme_comparisons)]
21769        #[allow(unused_comparisons)]
21770        if __tmp.remaining() < Self::ENCODED_LEN {
21771            panic!(
21772                "buffer is too small (need {} bytes, but got {})",
21773                Self::ENCODED_LEN,
21774                __tmp.remaining(),
21775            )
21776        }
21777        __tmp.put_u8(self.target_system);
21778        __tmp.put_u8(self.target_component);
21779        for val in &self.id_or_mac {
21780            __tmp.put_u8(*val);
21781        }
21782        __tmp.put_u8(self.id_type as u8);
21783        __tmp.put_u8(self.ua_type as u8);
21784        for val in &self.uas_id {
21785            __tmp.put_u8(*val);
21786        }
21787        if matches!(version, MavlinkVersion::V2) {
21788            let len = __tmp.len();
21789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21790        } else {
21791            __tmp.len()
21792        }
21793    }
21794}
21795#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21796#[doc = ""]
21797#[doc = "ID: 12901"]
21798#[derive(Debug, Clone, PartialEq)]
21799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21801#[cfg_attr(feature = "ts", derive(TS))]
21802#[cfg_attr(feature = "ts", ts(export))]
21803pub struct OPEN_DRONE_ID_LOCATION_DATA {
21804    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21805    pub latitude: i32,
21806    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21807    pub longitude: i32,
21808    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21809    pub altitude_barometric: f32,
21810    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21811    pub altitude_geodetic: f32,
21812    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21813    pub height: f32,
21814    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21815    pub timestamp: f32,
21816    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21817    pub direction: u16,
21818    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21819    pub speed_horizontal: u16,
21820    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21821    pub speed_vertical: i16,
21822    #[doc = "System ID (0 for broadcast)."]
21823    pub target_system: u8,
21824    #[doc = "Component ID (0 for broadcast)."]
21825    pub target_component: u8,
21826    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21829    pub id_or_mac: [u8; 20],
21830    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21831    pub status: MavOdidStatus,
21832    #[doc = "Indicates the reference point for the height field."]
21833    pub height_reference: MavOdidHeightRef,
21834    #[doc = "The accuracy of the horizontal position."]
21835    pub horizontal_accuracy: MavOdidHorAcc,
21836    #[doc = "The accuracy of the vertical position."]
21837    pub vertical_accuracy: MavOdidVerAcc,
21838    #[doc = "The accuracy of the barometric altitude."]
21839    pub barometer_accuracy: MavOdidVerAcc,
21840    #[doc = "The accuracy of the horizontal and vertical speed."]
21841    pub speed_accuracy: MavOdidSpeedAcc,
21842    #[doc = "The accuracy of the timestamps."]
21843    pub timestamp_accuracy: MavOdidTimeAcc,
21844}
21845impl OPEN_DRONE_ID_LOCATION_DATA {
21846    pub const ENCODED_LEN: usize = 59usize;
21847    pub const DEFAULT: Self = Self {
21848        latitude: 0_i32,
21849        longitude: 0_i32,
21850        altitude_barometric: 0.0_f32,
21851        altitude_geodetic: 0.0_f32,
21852        height: 0.0_f32,
21853        timestamp: 0.0_f32,
21854        direction: 0_u16,
21855        speed_horizontal: 0_u16,
21856        speed_vertical: 0_i16,
21857        target_system: 0_u8,
21858        target_component: 0_u8,
21859        id_or_mac: [0_u8; 20usize],
21860        status: MavOdidStatus::DEFAULT,
21861        height_reference: MavOdidHeightRef::DEFAULT,
21862        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21863        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21864        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21865        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21866        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21867    };
21868    #[cfg(feature = "arbitrary")]
21869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21870        use arbitrary::{Arbitrary, Unstructured};
21871        let mut buf = [0u8; 1024];
21872        rng.fill_bytes(&mut buf);
21873        let mut unstructured = Unstructured::new(&buf);
21874        Self::arbitrary(&mut unstructured).unwrap_or_default()
21875    }
21876}
21877impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21878    fn default() -> Self {
21879        Self::DEFAULT.clone()
21880    }
21881}
21882impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21883    type Message = MavMessage;
21884    const ID: u32 = 12901u32;
21885    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21886    const EXTRA_CRC: u8 = 254u8;
21887    const ENCODED_LEN: usize = 59usize;
21888    fn deser(
21889        _version: MavlinkVersion,
21890        __input: &[u8],
21891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21892        let avail_len = __input.len();
21893        let mut payload_buf = [0; Self::ENCODED_LEN];
21894        let mut buf = if avail_len < Self::ENCODED_LEN {
21895            payload_buf[0..avail_len].copy_from_slice(__input);
21896            Bytes::new(&payload_buf)
21897        } else {
21898            Bytes::new(__input)
21899        };
21900        let mut __struct = Self::default();
21901        __struct.latitude = buf.get_i32_le();
21902        __struct.longitude = buf.get_i32_le();
21903        __struct.altitude_barometric = buf.get_f32_le();
21904        __struct.altitude_geodetic = buf.get_f32_le();
21905        __struct.height = buf.get_f32_le();
21906        __struct.timestamp = buf.get_f32_le();
21907        __struct.direction = buf.get_u16_le();
21908        __struct.speed_horizontal = buf.get_u16_le();
21909        __struct.speed_vertical = buf.get_i16_le();
21910        __struct.target_system = buf.get_u8();
21911        __struct.target_component = buf.get_u8();
21912        for v in &mut __struct.id_or_mac {
21913            let val = buf.get_u8();
21914            *v = val;
21915        }
21916        let tmp = buf.get_u8();
21917        __struct.status =
21918            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21919                enum_type: "MavOdidStatus",
21920                value: tmp as u32,
21921            })?;
21922        let tmp = buf.get_u8();
21923        __struct.height_reference =
21924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21925                enum_type: "MavOdidHeightRef",
21926                value: tmp as u32,
21927            })?;
21928        let tmp = buf.get_u8();
21929        __struct.horizontal_accuracy =
21930            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21931                enum_type: "MavOdidHorAcc",
21932                value: tmp as u32,
21933            })?;
21934        let tmp = buf.get_u8();
21935        __struct.vertical_accuracy =
21936            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21937                enum_type: "MavOdidVerAcc",
21938                value: tmp as u32,
21939            })?;
21940        let tmp = buf.get_u8();
21941        __struct.barometer_accuracy =
21942            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21943                enum_type: "MavOdidVerAcc",
21944                value: tmp as u32,
21945            })?;
21946        let tmp = buf.get_u8();
21947        __struct.speed_accuracy =
21948            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21949                enum_type: "MavOdidSpeedAcc",
21950                value: tmp as u32,
21951            })?;
21952        let tmp = buf.get_u8();
21953        __struct.timestamp_accuracy =
21954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21955                enum_type: "MavOdidTimeAcc",
21956                value: tmp as u32,
21957            })?;
21958        Ok(__struct)
21959    }
21960    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21961        let mut __tmp = BytesMut::new(bytes);
21962        #[allow(clippy::absurd_extreme_comparisons)]
21963        #[allow(unused_comparisons)]
21964        if __tmp.remaining() < Self::ENCODED_LEN {
21965            panic!(
21966                "buffer is too small (need {} bytes, but got {})",
21967                Self::ENCODED_LEN,
21968                __tmp.remaining(),
21969            )
21970        }
21971        __tmp.put_i32_le(self.latitude);
21972        __tmp.put_i32_le(self.longitude);
21973        __tmp.put_f32_le(self.altitude_barometric);
21974        __tmp.put_f32_le(self.altitude_geodetic);
21975        __tmp.put_f32_le(self.height);
21976        __tmp.put_f32_le(self.timestamp);
21977        __tmp.put_u16_le(self.direction);
21978        __tmp.put_u16_le(self.speed_horizontal);
21979        __tmp.put_i16_le(self.speed_vertical);
21980        __tmp.put_u8(self.target_system);
21981        __tmp.put_u8(self.target_component);
21982        for val in &self.id_or_mac {
21983            __tmp.put_u8(*val);
21984        }
21985        __tmp.put_u8(self.status as u8);
21986        __tmp.put_u8(self.height_reference as u8);
21987        __tmp.put_u8(self.horizontal_accuracy as u8);
21988        __tmp.put_u8(self.vertical_accuracy as u8);
21989        __tmp.put_u8(self.barometer_accuracy as u8);
21990        __tmp.put_u8(self.speed_accuracy as u8);
21991        __tmp.put_u8(self.timestamp_accuracy as u8);
21992        if matches!(version, MavlinkVersion::V2) {
21993            let len = __tmp.len();
21994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21995        } else {
21996            __tmp.len()
21997        }
21998    }
21999}
22000#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22001#[doc = ""]
22002#[doc = "ID: 12915"]
22003#[derive(Debug, Clone, PartialEq)]
22004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22006#[cfg_attr(feature = "ts", derive(TS))]
22007#[cfg_attr(feature = "ts", ts(export))]
22008pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22009    #[doc = "System ID (0 for broadcast)."]
22010    pub target_system: u8,
22011    #[doc = "Component ID (0 for broadcast)."]
22012    pub target_component: u8,
22013    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22015    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22016    pub id_or_mac: [u8; 20],
22017    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22018    pub single_message_size: u8,
22019    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22020    pub msg_pack_size: u8,
22021    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22022    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22023    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22024    pub messages: [u8; 225],
22025}
22026impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22027    pub const ENCODED_LEN: usize = 249usize;
22028    pub const DEFAULT: Self = Self {
22029        target_system: 0_u8,
22030        target_component: 0_u8,
22031        id_or_mac: [0_u8; 20usize],
22032        single_message_size: 0_u8,
22033        msg_pack_size: 0_u8,
22034        messages: [0_u8; 225usize],
22035    };
22036    #[cfg(feature = "arbitrary")]
22037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22038        use arbitrary::{Arbitrary, Unstructured};
22039        let mut buf = [0u8; 1024];
22040        rng.fill_bytes(&mut buf);
22041        let mut unstructured = Unstructured::new(&buf);
22042        Self::arbitrary(&mut unstructured).unwrap_or_default()
22043    }
22044}
22045impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22046    fn default() -> Self {
22047        Self::DEFAULT.clone()
22048    }
22049}
22050impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22051    type Message = MavMessage;
22052    const ID: u32 = 12915u32;
22053    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22054    const EXTRA_CRC: u8 = 94u8;
22055    const ENCODED_LEN: usize = 249usize;
22056    fn deser(
22057        _version: MavlinkVersion,
22058        __input: &[u8],
22059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22060        let avail_len = __input.len();
22061        let mut payload_buf = [0; Self::ENCODED_LEN];
22062        let mut buf = if avail_len < Self::ENCODED_LEN {
22063            payload_buf[0..avail_len].copy_from_slice(__input);
22064            Bytes::new(&payload_buf)
22065        } else {
22066            Bytes::new(__input)
22067        };
22068        let mut __struct = Self::default();
22069        __struct.target_system = buf.get_u8();
22070        __struct.target_component = buf.get_u8();
22071        for v in &mut __struct.id_or_mac {
22072            let val = buf.get_u8();
22073            *v = val;
22074        }
22075        __struct.single_message_size = buf.get_u8();
22076        __struct.msg_pack_size = buf.get_u8();
22077        for v in &mut __struct.messages {
22078            let val = buf.get_u8();
22079            *v = val;
22080        }
22081        Ok(__struct)
22082    }
22083    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22084        let mut __tmp = BytesMut::new(bytes);
22085        #[allow(clippy::absurd_extreme_comparisons)]
22086        #[allow(unused_comparisons)]
22087        if __tmp.remaining() < Self::ENCODED_LEN {
22088            panic!(
22089                "buffer is too small (need {} bytes, but got {})",
22090                Self::ENCODED_LEN,
22091                __tmp.remaining(),
22092            )
22093        }
22094        __tmp.put_u8(self.target_system);
22095        __tmp.put_u8(self.target_component);
22096        for val in &self.id_or_mac {
22097            __tmp.put_u8(*val);
22098        }
22099        __tmp.put_u8(self.single_message_size);
22100        __tmp.put_u8(self.msg_pack_size);
22101        for val in &self.messages {
22102            __tmp.put_u8(*val);
22103        }
22104        if matches!(version, MavlinkVersion::V2) {
22105            let len = __tmp.len();
22106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22107        } else {
22108            __tmp.len()
22109        }
22110    }
22111}
22112#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22113#[doc = ""]
22114#[doc = "ID: 12905"]
22115#[derive(Debug, Clone, PartialEq)]
22116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22118#[cfg_attr(feature = "ts", derive(TS))]
22119#[cfg_attr(feature = "ts", ts(export))]
22120pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22121    #[doc = "System ID (0 for broadcast)."]
22122    pub target_system: u8,
22123    #[doc = "Component ID (0 for broadcast)."]
22124    pub target_component: u8,
22125    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22127    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22128    pub id_or_mac: [u8; 20],
22129    #[doc = "Indicates the type of the operator_id field."]
22130    pub operator_id_type: MavOdidOperatorIdType,
22131    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22133    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22134    pub operator_id: [u8; 20],
22135}
22136impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22137    pub const ENCODED_LEN: usize = 43usize;
22138    pub const DEFAULT: Self = Self {
22139        target_system: 0_u8,
22140        target_component: 0_u8,
22141        id_or_mac: [0_u8; 20usize],
22142        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22143        operator_id: [0_u8; 20usize],
22144    };
22145    #[cfg(feature = "arbitrary")]
22146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22147        use arbitrary::{Arbitrary, Unstructured};
22148        let mut buf = [0u8; 1024];
22149        rng.fill_bytes(&mut buf);
22150        let mut unstructured = Unstructured::new(&buf);
22151        Self::arbitrary(&mut unstructured).unwrap_or_default()
22152    }
22153}
22154impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22155    fn default() -> Self {
22156        Self::DEFAULT.clone()
22157    }
22158}
22159impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22160    type Message = MavMessage;
22161    const ID: u32 = 12905u32;
22162    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22163    const EXTRA_CRC: u8 = 49u8;
22164    const ENCODED_LEN: usize = 43usize;
22165    fn deser(
22166        _version: MavlinkVersion,
22167        __input: &[u8],
22168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22169        let avail_len = __input.len();
22170        let mut payload_buf = [0; Self::ENCODED_LEN];
22171        let mut buf = if avail_len < Self::ENCODED_LEN {
22172            payload_buf[0..avail_len].copy_from_slice(__input);
22173            Bytes::new(&payload_buf)
22174        } else {
22175            Bytes::new(__input)
22176        };
22177        let mut __struct = Self::default();
22178        __struct.target_system = buf.get_u8();
22179        __struct.target_component = buf.get_u8();
22180        for v in &mut __struct.id_or_mac {
22181            let val = buf.get_u8();
22182            *v = val;
22183        }
22184        let tmp = buf.get_u8();
22185        __struct.operator_id_type =
22186            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22187                enum_type: "MavOdidOperatorIdType",
22188                value: tmp as u32,
22189            })?;
22190        for v in &mut __struct.operator_id {
22191            let val = buf.get_u8();
22192            *v = val;
22193        }
22194        Ok(__struct)
22195    }
22196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22197        let mut __tmp = BytesMut::new(bytes);
22198        #[allow(clippy::absurd_extreme_comparisons)]
22199        #[allow(unused_comparisons)]
22200        if __tmp.remaining() < Self::ENCODED_LEN {
22201            panic!(
22202                "buffer is too small (need {} bytes, but got {})",
22203                Self::ENCODED_LEN,
22204                __tmp.remaining(),
22205            )
22206        }
22207        __tmp.put_u8(self.target_system);
22208        __tmp.put_u8(self.target_component);
22209        for val in &self.id_or_mac {
22210            __tmp.put_u8(*val);
22211        }
22212        __tmp.put_u8(self.operator_id_type as u8);
22213        for val in &self.operator_id {
22214            __tmp.put_u8(*val);
22215        }
22216        if matches!(version, MavlinkVersion::V2) {
22217            let len = __tmp.len();
22218            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22219        } else {
22220            __tmp.len()
22221        }
22222    }
22223}
22224#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22225#[doc = ""]
22226#[doc = "ID: 12903"]
22227#[derive(Debug, Clone, PartialEq)]
22228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22230#[cfg_attr(feature = "ts", derive(TS))]
22231#[cfg_attr(feature = "ts", ts(export))]
22232pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22233    #[doc = "System ID (0 for broadcast)."]
22234    pub target_system: u8,
22235    #[doc = "Component ID (0 for broadcast)."]
22236    pub target_component: u8,
22237    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22239    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22240    pub id_or_mac: [u8; 20],
22241    #[doc = "Indicates the type of the description field."]
22242    pub description_type: MavOdidDescType,
22243    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22245    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22246    pub description: [u8; 23],
22247}
22248impl OPEN_DRONE_ID_SELF_ID_DATA {
22249    pub const ENCODED_LEN: usize = 46usize;
22250    pub const DEFAULT: Self = Self {
22251        target_system: 0_u8,
22252        target_component: 0_u8,
22253        id_or_mac: [0_u8; 20usize],
22254        description_type: MavOdidDescType::DEFAULT,
22255        description: [0_u8; 23usize],
22256    };
22257    #[cfg(feature = "arbitrary")]
22258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22259        use arbitrary::{Arbitrary, Unstructured};
22260        let mut buf = [0u8; 1024];
22261        rng.fill_bytes(&mut buf);
22262        let mut unstructured = Unstructured::new(&buf);
22263        Self::arbitrary(&mut unstructured).unwrap_or_default()
22264    }
22265}
22266impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22267    fn default() -> Self {
22268        Self::DEFAULT.clone()
22269    }
22270}
22271impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22272    type Message = MavMessage;
22273    const ID: u32 = 12903u32;
22274    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22275    const EXTRA_CRC: u8 = 249u8;
22276    const ENCODED_LEN: usize = 46usize;
22277    fn deser(
22278        _version: MavlinkVersion,
22279        __input: &[u8],
22280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22281        let avail_len = __input.len();
22282        let mut payload_buf = [0; Self::ENCODED_LEN];
22283        let mut buf = if avail_len < Self::ENCODED_LEN {
22284            payload_buf[0..avail_len].copy_from_slice(__input);
22285            Bytes::new(&payload_buf)
22286        } else {
22287            Bytes::new(__input)
22288        };
22289        let mut __struct = Self::default();
22290        __struct.target_system = buf.get_u8();
22291        __struct.target_component = buf.get_u8();
22292        for v in &mut __struct.id_or_mac {
22293            let val = buf.get_u8();
22294            *v = val;
22295        }
22296        let tmp = buf.get_u8();
22297        __struct.description_type =
22298            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22299                enum_type: "MavOdidDescType",
22300                value: tmp as u32,
22301            })?;
22302        for v in &mut __struct.description {
22303            let val = buf.get_u8();
22304            *v = val;
22305        }
22306        Ok(__struct)
22307    }
22308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22309        let mut __tmp = BytesMut::new(bytes);
22310        #[allow(clippy::absurd_extreme_comparisons)]
22311        #[allow(unused_comparisons)]
22312        if __tmp.remaining() < Self::ENCODED_LEN {
22313            panic!(
22314                "buffer is too small (need {} bytes, but got {})",
22315                Self::ENCODED_LEN,
22316                __tmp.remaining(),
22317            )
22318        }
22319        __tmp.put_u8(self.target_system);
22320        __tmp.put_u8(self.target_component);
22321        for val in &self.id_or_mac {
22322            __tmp.put_u8(*val);
22323        }
22324        __tmp.put_u8(self.description_type as u8);
22325        for val in &self.description {
22326            __tmp.put_u8(*val);
22327        }
22328        if matches!(version, MavlinkVersion::V2) {
22329            let len = __tmp.len();
22330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22331        } else {
22332            __tmp.len()
22333        }
22334    }
22335}
22336#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22337#[doc = ""]
22338#[doc = "ID: 12904"]
22339#[derive(Debug, Clone, PartialEq)]
22340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22342#[cfg_attr(feature = "ts", derive(TS))]
22343#[cfg_attr(feature = "ts", ts(export))]
22344pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22345    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22346    pub operator_latitude: i32,
22347    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22348    pub operator_longitude: i32,
22349    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22350    pub area_ceiling: f32,
22351    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22352    pub area_floor: f32,
22353    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22354    pub operator_altitude_geo: f32,
22355    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22356    pub timestamp: u32,
22357    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22358    pub area_count: u16,
22359    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22360    pub area_radius: u16,
22361    #[doc = "System ID (0 for broadcast)."]
22362    pub target_system: u8,
22363    #[doc = "Component ID (0 for broadcast)."]
22364    pub target_component: u8,
22365    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22368    pub id_or_mac: [u8; 20],
22369    #[doc = "Specifies the operator location type."]
22370    pub operator_location_type: MavOdidOperatorLocationType,
22371    #[doc = "Specifies the classification type of the UA."]
22372    pub classification_type: MavOdidClassificationType,
22373    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22374    pub category_eu: MavOdidCategoryEu,
22375    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22376    pub class_eu: MavOdidClassEu,
22377}
22378impl OPEN_DRONE_ID_SYSTEM_DATA {
22379    pub const ENCODED_LEN: usize = 54usize;
22380    pub const DEFAULT: Self = Self {
22381        operator_latitude: 0_i32,
22382        operator_longitude: 0_i32,
22383        area_ceiling: 0.0_f32,
22384        area_floor: 0.0_f32,
22385        operator_altitude_geo: 0.0_f32,
22386        timestamp: 0_u32,
22387        area_count: 0_u16,
22388        area_radius: 0_u16,
22389        target_system: 0_u8,
22390        target_component: 0_u8,
22391        id_or_mac: [0_u8; 20usize],
22392        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22393        classification_type: MavOdidClassificationType::DEFAULT,
22394        category_eu: MavOdidCategoryEu::DEFAULT,
22395        class_eu: MavOdidClassEu::DEFAULT,
22396    };
22397    #[cfg(feature = "arbitrary")]
22398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22399        use arbitrary::{Arbitrary, Unstructured};
22400        let mut buf = [0u8; 1024];
22401        rng.fill_bytes(&mut buf);
22402        let mut unstructured = Unstructured::new(&buf);
22403        Self::arbitrary(&mut unstructured).unwrap_or_default()
22404    }
22405}
22406impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22407    fn default() -> Self {
22408        Self::DEFAULT.clone()
22409    }
22410}
22411impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22412    type Message = MavMessage;
22413    const ID: u32 = 12904u32;
22414    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22415    const EXTRA_CRC: u8 = 77u8;
22416    const ENCODED_LEN: usize = 54usize;
22417    fn deser(
22418        _version: MavlinkVersion,
22419        __input: &[u8],
22420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22421        let avail_len = __input.len();
22422        let mut payload_buf = [0; Self::ENCODED_LEN];
22423        let mut buf = if avail_len < Self::ENCODED_LEN {
22424            payload_buf[0..avail_len].copy_from_slice(__input);
22425            Bytes::new(&payload_buf)
22426        } else {
22427            Bytes::new(__input)
22428        };
22429        let mut __struct = Self::default();
22430        __struct.operator_latitude = buf.get_i32_le();
22431        __struct.operator_longitude = buf.get_i32_le();
22432        __struct.area_ceiling = buf.get_f32_le();
22433        __struct.area_floor = buf.get_f32_le();
22434        __struct.operator_altitude_geo = buf.get_f32_le();
22435        __struct.timestamp = buf.get_u32_le();
22436        __struct.area_count = buf.get_u16_le();
22437        __struct.area_radius = buf.get_u16_le();
22438        __struct.target_system = buf.get_u8();
22439        __struct.target_component = buf.get_u8();
22440        for v in &mut __struct.id_or_mac {
22441            let val = buf.get_u8();
22442            *v = val;
22443        }
22444        let tmp = buf.get_u8();
22445        __struct.operator_location_type =
22446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22447                enum_type: "MavOdidOperatorLocationType",
22448                value: tmp as u32,
22449            })?;
22450        let tmp = buf.get_u8();
22451        __struct.classification_type =
22452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22453                enum_type: "MavOdidClassificationType",
22454                value: tmp as u32,
22455            })?;
22456        let tmp = buf.get_u8();
22457        __struct.category_eu =
22458            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22459                enum_type: "MavOdidCategoryEu",
22460                value: tmp as u32,
22461            })?;
22462        let tmp = buf.get_u8();
22463        __struct.class_eu =
22464            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22465                enum_type: "MavOdidClassEu",
22466                value: tmp as u32,
22467            })?;
22468        Ok(__struct)
22469    }
22470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22471        let mut __tmp = BytesMut::new(bytes);
22472        #[allow(clippy::absurd_extreme_comparisons)]
22473        #[allow(unused_comparisons)]
22474        if __tmp.remaining() < Self::ENCODED_LEN {
22475            panic!(
22476                "buffer is too small (need {} bytes, but got {})",
22477                Self::ENCODED_LEN,
22478                __tmp.remaining(),
22479            )
22480        }
22481        __tmp.put_i32_le(self.operator_latitude);
22482        __tmp.put_i32_le(self.operator_longitude);
22483        __tmp.put_f32_le(self.area_ceiling);
22484        __tmp.put_f32_le(self.area_floor);
22485        __tmp.put_f32_le(self.operator_altitude_geo);
22486        __tmp.put_u32_le(self.timestamp);
22487        __tmp.put_u16_le(self.area_count);
22488        __tmp.put_u16_le(self.area_radius);
22489        __tmp.put_u8(self.target_system);
22490        __tmp.put_u8(self.target_component);
22491        for val in &self.id_or_mac {
22492            __tmp.put_u8(*val);
22493        }
22494        __tmp.put_u8(self.operator_location_type as u8);
22495        __tmp.put_u8(self.classification_type as u8);
22496        __tmp.put_u8(self.category_eu as u8);
22497        __tmp.put_u8(self.class_eu as u8);
22498        if matches!(version, MavlinkVersion::V2) {
22499            let len = __tmp.len();
22500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22501        } else {
22502            __tmp.len()
22503        }
22504    }
22505}
22506#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22507#[doc = ""]
22508#[doc = "ID: 12919"]
22509#[derive(Debug, Clone, PartialEq)]
22510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22512#[cfg_attr(feature = "ts", derive(TS))]
22513#[cfg_attr(feature = "ts", ts(export))]
22514pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22515    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22516    pub operator_latitude: i32,
22517    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22518    pub operator_longitude: i32,
22519    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22520    pub operator_altitude_geo: f32,
22521    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22522    pub timestamp: u32,
22523    #[doc = "System ID (0 for broadcast)."]
22524    pub target_system: u8,
22525    #[doc = "Component ID (0 for broadcast)."]
22526    pub target_component: u8,
22527}
22528impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22529    pub const ENCODED_LEN: usize = 18usize;
22530    pub const DEFAULT: Self = Self {
22531        operator_latitude: 0_i32,
22532        operator_longitude: 0_i32,
22533        operator_altitude_geo: 0.0_f32,
22534        timestamp: 0_u32,
22535        target_system: 0_u8,
22536        target_component: 0_u8,
22537    };
22538    #[cfg(feature = "arbitrary")]
22539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22540        use arbitrary::{Arbitrary, Unstructured};
22541        let mut buf = [0u8; 1024];
22542        rng.fill_bytes(&mut buf);
22543        let mut unstructured = Unstructured::new(&buf);
22544        Self::arbitrary(&mut unstructured).unwrap_or_default()
22545    }
22546}
22547impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22548    fn default() -> Self {
22549        Self::DEFAULT.clone()
22550    }
22551}
22552impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22553    type Message = MavMessage;
22554    const ID: u32 = 12919u32;
22555    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22556    const EXTRA_CRC: u8 = 7u8;
22557    const ENCODED_LEN: usize = 18usize;
22558    fn deser(
22559        _version: MavlinkVersion,
22560        __input: &[u8],
22561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22562        let avail_len = __input.len();
22563        let mut payload_buf = [0; Self::ENCODED_LEN];
22564        let mut buf = if avail_len < Self::ENCODED_LEN {
22565            payload_buf[0..avail_len].copy_from_slice(__input);
22566            Bytes::new(&payload_buf)
22567        } else {
22568            Bytes::new(__input)
22569        };
22570        let mut __struct = Self::default();
22571        __struct.operator_latitude = buf.get_i32_le();
22572        __struct.operator_longitude = buf.get_i32_le();
22573        __struct.operator_altitude_geo = buf.get_f32_le();
22574        __struct.timestamp = buf.get_u32_le();
22575        __struct.target_system = buf.get_u8();
22576        __struct.target_component = buf.get_u8();
22577        Ok(__struct)
22578    }
22579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22580        let mut __tmp = BytesMut::new(bytes);
22581        #[allow(clippy::absurd_extreme_comparisons)]
22582        #[allow(unused_comparisons)]
22583        if __tmp.remaining() < Self::ENCODED_LEN {
22584            panic!(
22585                "buffer is too small (need {} bytes, but got {})",
22586                Self::ENCODED_LEN,
22587                __tmp.remaining(),
22588            )
22589        }
22590        __tmp.put_i32_le(self.operator_latitude);
22591        __tmp.put_i32_le(self.operator_longitude);
22592        __tmp.put_f32_le(self.operator_altitude_geo);
22593        __tmp.put_u32_le(self.timestamp);
22594        __tmp.put_u8(self.target_system);
22595        __tmp.put_u8(self.target_component);
22596        if matches!(version, MavlinkVersion::V2) {
22597            let len = __tmp.len();
22598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22599        } else {
22600            __tmp.len()
22601        }
22602    }
22603}
22604#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22605#[doc = ""]
22606#[doc = "ID: 100"]
22607#[derive(Debug, Clone, PartialEq)]
22608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22610#[cfg_attr(feature = "ts", derive(TS))]
22611#[cfg_attr(feature = "ts", ts(export))]
22612pub struct OPTICAL_FLOW_DATA {
22613    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22614    pub time_usec: u64,
22615    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22616    pub flow_comp_m_x: f32,
22617    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22618    pub flow_comp_m_y: f32,
22619    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22620    pub ground_distance: f32,
22621    #[doc = "Flow in x-sensor direction"]
22622    pub flow_x: i16,
22623    #[doc = "Flow in y-sensor direction"]
22624    pub flow_y: i16,
22625    #[doc = "Sensor ID"]
22626    pub sensor_id: u8,
22627    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22628    pub quality: u8,
22629    #[doc = "Flow rate about X axis"]
22630    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22631    pub flow_rate_x: f32,
22632    #[doc = "Flow rate about Y axis"]
22633    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22634    pub flow_rate_y: f32,
22635}
22636impl OPTICAL_FLOW_DATA {
22637    pub const ENCODED_LEN: usize = 34usize;
22638    pub const DEFAULT: Self = Self {
22639        time_usec: 0_u64,
22640        flow_comp_m_x: 0.0_f32,
22641        flow_comp_m_y: 0.0_f32,
22642        ground_distance: 0.0_f32,
22643        flow_x: 0_i16,
22644        flow_y: 0_i16,
22645        sensor_id: 0_u8,
22646        quality: 0_u8,
22647        flow_rate_x: 0.0_f32,
22648        flow_rate_y: 0.0_f32,
22649    };
22650    #[cfg(feature = "arbitrary")]
22651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22652        use arbitrary::{Arbitrary, Unstructured};
22653        let mut buf = [0u8; 1024];
22654        rng.fill_bytes(&mut buf);
22655        let mut unstructured = Unstructured::new(&buf);
22656        Self::arbitrary(&mut unstructured).unwrap_or_default()
22657    }
22658}
22659impl Default for OPTICAL_FLOW_DATA {
22660    fn default() -> Self {
22661        Self::DEFAULT.clone()
22662    }
22663}
22664impl MessageData for OPTICAL_FLOW_DATA {
22665    type Message = MavMessage;
22666    const ID: u32 = 100u32;
22667    const NAME: &'static str = "OPTICAL_FLOW";
22668    const EXTRA_CRC: u8 = 175u8;
22669    const ENCODED_LEN: usize = 34usize;
22670    fn deser(
22671        _version: MavlinkVersion,
22672        __input: &[u8],
22673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22674        let avail_len = __input.len();
22675        let mut payload_buf = [0; Self::ENCODED_LEN];
22676        let mut buf = if avail_len < Self::ENCODED_LEN {
22677            payload_buf[0..avail_len].copy_from_slice(__input);
22678            Bytes::new(&payload_buf)
22679        } else {
22680            Bytes::new(__input)
22681        };
22682        let mut __struct = Self::default();
22683        __struct.time_usec = buf.get_u64_le();
22684        __struct.flow_comp_m_x = buf.get_f32_le();
22685        __struct.flow_comp_m_y = buf.get_f32_le();
22686        __struct.ground_distance = buf.get_f32_le();
22687        __struct.flow_x = buf.get_i16_le();
22688        __struct.flow_y = buf.get_i16_le();
22689        __struct.sensor_id = buf.get_u8();
22690        __struct.quality = buf.get_u8();
22691        __struct.flow_rate_x = buf.get_f32_le();
22692        __struct.flow_rate_y = buf.get_f32_le();
22693        Ok(__struct)
22694    }
22695    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22696        let mut __tmp = BytesMut::new(bytes);
22697        #[allow(clippy::absurd_extreme_comparisons)]
22698        #[allow(unused_comparisons)]
22699        if __tmp.remaining() < Self::ENCODED_LEN {
22700            panic!(
22701                "buffer is too small (need {} bytes, but got {})",
22702                Self::ENCODED_LEN,
22703                __tmp.remaining(),
22704            )
22705        }
22706        __tmp.put_u64_le(self.time_usec);
22707        __tmp.put_f32_le(self.flow_comp_m_x);
22708        __tmp.put_f32_le(self.flow_comp_m_y);
22709        __tmp.put_f32_le(self.ground_distance);
22710        __tmp.put_i16_le(self.flow_x);
22711        __tmp.put_i16_le(self.flow_y);
22712        __tmp.put_u8(self.sensor_id);
22713        __tmp.put_u8(self.quality);
22714        if matches!(version, MavlinkVersion::V2) {
22715            __tmp.put_f32_le(self.flow_rate_x);
22716            __tmp.put_f32_le(self.flow_rate_y);
22717            let len = __tmp.len();
22718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22719        } else {
22720            __tmp.len()
22721        }
22722    }
22723}
22724#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22725#[doc = ""]
22726#[doc = "ID: 106"]
22727#[derive(Debug, Clone, PartialEq)]
22728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22730#[cfg_attr(feature = "ts", derive(TS))]
22731#[cfg_attr(feature = "ts", ts(export))]
22732pub struct OPTICAL_FLOW_RAD_DATA {
22733    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22734    pub time_usec: u64,
22735    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22736    pub integration_time_us: u32,
22737    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22738    pub integrated_x: f32,
22739    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22740    pub integrated_y: f32,
22741    #[doc = "RH rotation around X axis"]
22742    pub integrated_xgyro: f32,
22743    #[doc = "RH rotation around Y axis"]
22744    pub integrated_ygyro: f32,
22745    #[doc = "RH rotation around Z axis"]
22746    pub integrated_zgyro: f32,
22747    #[doc = "Time since the distance was sampled."]
22748    pub time_delta_distance_us: u32,
22749    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22750    pub distance: f32,
22751    #[doc = "Temperature"]
22752    pub temperature: i16,
22753    #[doc = "Sensor ID"]
22754    pub sensor_id: u8,
22755    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22756    pub quality: u8,
22757}
22758impl OPTICAL_FLOW_RAD_DATA {
22759    pub const ENCODED_LEN: usize = 44usize;
22760    pub const DEFAULT: Self = Self {
22761        time_usec: 0_u64,
22762        integration_time_us: 0_u32,
22763        integrated_x: 0.0_f32,
22764        integrated_y: 0.0_f32,
22765        integrated_xgyro: 0.0_f32,
22766        integrated_ygyro: 0.0_f32,
22767        integrated_zgyro: 0.0_f32,
22768        time_delta_distance_us: 0_u32,
22769        distance: 0.0_f32,
22770        temperature: 0_i16,
22771        sensor_id: 0_u8,
22772        quality: 0_u8,
22773    };
22774    #[cfg(feature = "arbitrary")]
22775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22776        use arbitrary::{Arbitrary, Unstructured};
22777        let mut buf = [0u8; 1024];
22778        rng.fill_bytes(&mut buf);
22779        let mut unstructured = Unstructured::new(&buf);
22780        Self::arbitrary(&mut unstructured).unwrap_or_default()
22781    }
22782}
22783impl Default for OPTICAL_FLOW_RAD_DATA {
22784    fn default() -> Self {
22785        Self::DEFAULT.clone()
22786    }
22787}
22788impl MessageData for OPTICAL_FLOW_RAD_DATA {
22789    type Message = MavMessage;
22790    const ID: u32 = 106u32;
22791    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22792    const EXTRA_CRC: u8 = 138u8;
22793    const ENCODED_LEN: usize = 44usize;
22794    fn deser(
22795        _version: MavlinkVersion,
22796        __input: &[u8],
22797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22798        let avail_len = __input.len();
22799        let mut payload_buf = [0; Self::ENCODED_LEN];
22800        let mut buf = if avail_len < Self::ENCODED_LEN {
22801            payload_buf[0..avail_len].copy_from_slice(__input);
22802            Bytes::new(&payload_buf)
22803        } else {
22804            Bytes::new(__input)
22805        };
22806        let mut __struct = Self::default();
22807        __struct.time_usec = buf.get_u64_le();
22808        __struct.integration_time_us = buf.get_u32_le();
22809        __struct.integrated_x = buf.get_f32_le();
22810        __struct.integrated_y = buf.get_f32_le();
22811        __struct.integrated_xgyro = buf.get_f32_le();
22812        __struct.integrated_ygyro = buf.get_f32_le();
22813        __struct.integrated_zgyro = buf.get_f32_le();
22814        __struct.time_delta_distance_us = buf.get_u32_le();
22815        __struct.distance = buf.get_f32_le();
22816        __struct.temperature = buf.get_i16_le();
22817        __struct.sensor_id = buf.get_u8();
22818        __struct.quality = buf.get_u8();
22819        Ok(__struct)
22820    }
22821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22822        let mut __tmp = BytesMut::new(bytes);
22823        #[allow(clippy::absurd_extreme_comparisons)]
22824        #[allow(unused_comparisons)]
22825        if __tmp.remaining() < Self::ENCODED_LEN {
22826            panic!(
22827                "buffer is too small (need {} bytes, but got {})",
22828                Self::ENCODED_LEN,
22829                __tmp.remaining(),
22830            )
22831        }
22832        __tmp.put_u64_le(self.time_usec);
22833        __tmp.put_u32_le(self.integration_time_us);
22834        __tmp.put_f32_le(self.integrated_x);
22835        __tmp.put_f32_le(self.integrated_y);
22836        __tmp.put_f32_le(self.integrated_xgyro);
22837        __tmp.put_f32_le(self.integrated_ygyro);
22838        __tmp.put_f32_le(self.integrated_zgyro);
22839        __tmp.put_u32_le(self.time_delta_distance_us);
22840        __tmp.put_f32_le(self.distance);
22841        __tmp.put_i16_le(self.temperature);
22842        __tmp.put_u8(self.sensor_id);
22843        __tmp.put_u8(self.quality);
22844        if matches!(version, MavlinkVersion::V2) {
22845            let len = __tmp.len();
22846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22847        } else {
22848            __tmp.len()
22849        }
22850    }
22851}
22852#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22853#[doc = ""]
22854#[doc = "ID: 360"]
22855#[derive(Debug, Clone, PartialEq)]
22856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22858#[cfg_attr(feature = "ts", derive(TS))]
22859#[cfg_attr(feature = "ts", ts(export))]
22860pub struct ORBIT_EXECUTION_STATUS_DATA {
22861    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22862    pub time_usec: u64,
22863    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22864    pub radius: f32,
22865    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22866    pub x: i32,
22867    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22868    pub y: i32,
22869    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22870    pub z: f32,
22871    #[doc = "The coordinate system of the fields: x, y, z."]
22872    pub frame: MavFrame,
22873}
22874impl ORBIT_EXECUTION_STATUS_DATA {
22875    pub const ENCODED_LEN: usize = 25usize;
22876    pub const DEFAULT: Self = Self {
22877        time_usec: 0_u64,
22878        radius: 0.0_f32,
22879        x: 0_i32,
22880        y: 0_i32,
22881        z: 0.0_f32,
22882        frame: MavFrame::DEFAULT,
22883    };
22884    #[cfg(feature = "arbitrary")]
22885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22886        use arbitrary::{Arbitrary, Unstructured};
22887        let mut buf = [0u8; 1024];
22888        rng.fill_bytes(&mut buf);
22889        let mut unstructured = Unstructured::new(&buf);
22890        Self::arbitrary(&mut unstructured).unwrap_or_default()
22891    }
22892}
22893impl Default for ORBIT_EXECUTION_STATUS_DATA {
22894    fn default() -> Self {
22895        Self::DEFAULT.clone()
22896    }
22897}
22898impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22899    type Message = MavMessage;
22900    const ID: u32 = 360u32;
22901    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22902    const EXTRA_CRC: u8 = 11u8;
22903    const ENCODED_LEN: usize = 25usize;
22904    fn deser(
22905        _version: MavlinkVersion,
22906        __input: &[u8],
22907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22908        let avail_len = __input.len();
22909        let mut payload_buf = [0; Self::ENCODED_LEN];
22910        let mut buf = if avail_len < Self::ENCODED_LEN {
22911            payload_buf[0..avail_len].copy_from_slice(__input);
22912            Bytes::new(&payload_buf)
22913        } else {
22914            Bytes::new(__input)
22915        };
22916        let mut __struct = Self::default();
22917        __struct.time_usec = buf.get_u64_le();
22918        __struct.radius = buf.get_f32_le();
22919        __struct.x = buf.get_i32_le();
22920        __struct.y = buf.get_i32_le();
22921        __struct.z = buf.get_f32_le();
22922        let tmp = buf.get_u8();
22923        __struct.frame =
22924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22925                enum_type: "MavFrame",
22926                value: tmp as u32,
22927            })?;
22928        Ok(__struct)
22929    }
22930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22931        let mut __tmp = BytesMut::new(bytes);
22932        #[allow(clippy::absurd_extreme_comparisons)]
22933        #[allow(unused_comparisons)]
22934        if __tmp.remaining() < Self::ENCODED_LEN {
22935            panic!(
22936                "buffer is too small (need {} bytes, but got {})",
22937                Self::ENCODED_LEN,
22938                __tmp.remaining(),
22939            )
22940        }
22941        __tmp.put_u64_le(self.time_usec);
22942        __tmp.put_f32_le(self.radius);
22943        __tmp.put_i32_le(self.x);
22944        __tmp.put_i32_le(self.y);
22945        __tmp.put_f32_le(self.z);
22946        __tmp.put_u8(self.frame as u8);
22947        if matches!(version, MavlinkVersion::V2) {
22948            let len = __tmp.len();
22949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22950        } else {
22951            __tmp.len()
22952        }
22953    }
22954}
22955#[doc = "Response from a PARAM_EXT_SET message."]
22956#[doc = ""]
22957#[doc = "ID: 324"]
22958#[derive(Debug, Clone, PartialEq)]
22959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22961#[cfg_attr(feature = "ts", derive(TS))]
22962#[cfg_attr(feature = "ts", ts(export))]
22963pub struct PARAM_EXT_ACK_DATA {
22964    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22966    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22967    pub param_id: [u8; 16],
22968    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22970    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22971    pub param_value: [u8; 128],
22972    #[doc = "Parameter type."]
22973    pub param_type: MavParamExtType,
22974    #[doc = "Result code."]
22975    pub param_result: ParamAck,
22976}
22977impl PARAM_EXT_ACK_DATA {
22978    pub const ENCODED_LEN: usize = 146usize;
22979    pub const DEFAULT: Self = Self {
22980        param_id: [0_u8; 16usize],
22981        param_value: [0_u8; 128usize],
22982        param_type: MavParamExtType::DEFAULT,
22983        param_result: ParamAck::DEFAULT,
22984    };
22985    #[cfg(feature = "arbitrary")]
22986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22987        use arbitrary::{Arbitrary, Unstructured};
22988        let mut buf = [0u8; 1024];
22989        rng.fill_bytes(&mut buf);
22990        let mut unstructured = Unstructured::new(&buf);
22991        Self::arbitrary(&mut unstructured).unwrap_or_default()
22992    }
22993}
22994impl Default for PARAM_EXT_ACK_DATA {
22995    fn default() -> Self {
22996        Self::DEFAULT.clone()
22997    }
22998}
22999impl MessageData for PARAM_EXT_ACK_DATA {
23000    type Message = MavMessage;
23001    const ID: u32 = 324u32;
23002    const NAME: &'static str = "PARAM_EXT_ACK";
23003    const EXTRA_CRC: u8 = 132u8;
23004    const ENCODED_LEN: usize = 146usize;
23005    fn deser(
23006        _version: MavlinkVersion,
23007        __input: &[u8],
23008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23009        let avail_len = __input.len();
23010        let mut payload_buf = [0; Self::ENCODED_LEN];
23011        let mut buf = if avail_len < Self::ENCODED_LEN {
23012            payload_buf[0..avail_len].copy_from_slice(__input);
23013            Bytes::new(&payload_buf)
23014        } else {
23015            Bytes::new(__input)
23016        };
23017        let mut __struct = Self::default();
23018        for v in &mut __struct.param_id {
23019            let val = buf.get_u8();
23020            *v = val;
23021        }
23022        for v in &mut __struct.param_value {
23023            let val = buf.get_u8();
23024            *v = val;
23025        }
23026        let tmp = buf.get_u8();
23027        __struct.param_type =
23028            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23029                enum_type: "MavParamExtType",
23030                value: tmp as u32,
23031            })?;
23032        let tmp = buf.get_u8();
23033        __struct.param_result =
23034            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23035                enum_type: "ParamAck",
23036                value: tmp as u32,
23037            })?;
23038        Ok(__struct)
23039    }
23040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23041        let mut __tmp = BytesMut::new(bytes);
23042        #[allow(clippy::absurd_extreme_comparisons)]
23043        #[allow(unused_comparisons)]
23044        if __tmp.remaining() < Self::ENCODED_LEN {
23045            panic!(
23046                "buffer is too small (need {} bytes, but got {})",
23047                Self::ENCODED_LEN,
23048                __tmp.remaining(),
23049            )
23050        }
23051        for val in &self.param_id {
23052            __tmp.put_u8(*val);
23053        }
23054        for val in &self.param_value {
23055            __tmp.put_u8(*val);
23056        }
23057        __tmp.put_u8(self.param_type as u8);
23058        __tmp.put_u8(self.param_result as u8);
23059        if matches!(version, MavlinkVersion::V2) {
23060            let len = __tmp.len();
23061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23062        } else {
23063            __tmp.len()
23064        }
23065    }
23066}
23067#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23068#[doc = ""]
23069#[doc = "ID: 321"]
23070#[derive(Debug, Clone, PartialEq)]
23071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23073#[cfg_attr(feature = "ts", derive(TS))]
23074#[cfg_attr(feature = "ts", ts(export))]
23075pub struct PARAM_EXT_REQUEST_LIST_DATA {
23076    #[doc = "System ID"]
23077    pub target_system: u8,
23078    #[doc = "Component ID"]
23079    pub target_component: u8,
23080}
23081impl PARAM_EXT_REQUEST_LIST_DATA {
23082    pub const ENCODED_LEN: usize = 2usize;
23083    pub const DEFAULT: Self = Self {
23084        target_system: 0_u8,
23085        target_component: 0_u8,
23086    };
23087    #[cfg(feature = "arbitrary")]
23088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23089        use arbitrary::{Arbitrary, Unstructured};
23090        let mut buf = [0u8; 1024];
23091        rng.fill_bytes(&mut buf);
23092        let mut unstructured = Unstructured::new(&buf);
23093        Self::arbitrary(&mut unstructured).unwrap_or_default()
23094    }
23095}
23096impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23097    fn default() -> Self {
23098        Self::DEFAULT.clone()
23099    }
23100}
23101impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23102    type Message = MavMessage;
23103    const ID: u32 = 321u32;
23104    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23105    const EXTRA_CRC: u8 = 88u8;
23106    const ENCODED_LEN: usize = 2usize;
23107    fn deser(
23108        _version: MavlinkVersion,
23109        __input: &[u8],
23110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23111        let avail_len = __input.len();
23112        let mut payload_buf = [0; Self::ENCODED_LEN];
23113        let mut buf = if avail_len < Self::ENCODED_LEN {
23114            payload_buf[0..avail_len].copy_from_slice(__input);
23115            Bytes::new(&payload_buf)
23116        } else {
23117            Bytes::new(__input)
23118        };
23119        let mut __struct = Self::default();
23120        __struct.target_system = buf.get_u8();
23121        __struct.target_component = buf.get_u8();
23122        Ok(__struct)
23123    }
23124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23125        let mut __tmp = BytesMut::new(bytes);
23126        #[allow(clippy::absurd_extreme_comparisons)]
23127        #[allow(unused_comparisons)]
23128        if __tmp.remaining() < Self::ENCODED_LEN {
23129            panic!(
23130                "buffer is too small (need {} bytes, but got {})",
23131                Self::ENCODED_LEN,
23132                __tmp.remaining(),
23133            )
23134        }
23135        __tmp.put_u8(self.target_system);
23136        __tmp.put_u8(self.target_component);
23137        if matches!(version, MavlinkVersion::V2) {
23138            let len = __tmp.len();
23139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23140        } else {
23141            __tmp.len()
23142        }
23143    }
23144}
23145#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23146#[doc = ""]
23147#[doc = "ID: 320"]
23148#[derive(Debug, Clone, PartialEq)]
23149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23151#[cfg_attr(feature = "ts", derive(TS))]
23152#[cfg_attr(feature = "ts", ts(export))]
23153pub struct PARAM_EXT_REQUEST_READ_DATA {
23154    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23155    pub param_index: i16,
23156    #[doc = "System ID"]
23157    pub target_system: u8,
23158    #[doc = "Component ID"]
23159    pub target_component: u8,
23160    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23163    pub param_id: [u8; 16],
23164}
23165impl PARAM_EXT_REQUEST_READ_DATA {
23166    pub const ENCODED_LEN: usize = 20usize;
23167    pub const DEFAULT: Self = Self {
23168        param_index: 0_i16,
23169        target_system: 0_u8,
23170        target_component: 0_u8,
23171        param_id: [0_u8; 16usize],
23172    };
23173    #[cfg(feature = "arbitrary")]
23174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23175        use arbitrary::{Arbitrary, Unstructured};
23176        let mut buf = [0u8; 1024];
23177        rng.fill_bytes(&mut buf);
23178        let mut unstructured = Unstructured::new(&buf);
23179        Self::arbitrary(&mut unstructured).unwrap_or_default()
23180    }
23181}
23182impl Default for PARAM_EXT_REQUEST_READ_DATA {
23183    fn default() -> Self {
23184        Self::DEFAULT.clone()
23185    }
23186}
23187impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23188    type Message = MavMessage;
23189    const ID: u32 = 320u32;
23190    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23191    const EXTRA_CRC: u8 = 243u8;
23192    const ENCODED_LEN: usize = 20usize;
23193    fn deser(
23194        _version: MavlinkVersion,
23195        __input: &[u8],
23196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23197        let avail_len = __input.len();
23198        let mut payload_buf = [0; Self::ENCODED_LEN];
23199        let mut buf = if avail_len < Self::ENCODED_LEN {
23200            payload_buf[0..avail_len].copy_from_slice(__input);
23201            Bytes::new(&payload_buf)
23202        } else {
23203            Bytes::new(__input)
23204        };
23205        let mut __struct = Self::default();
23206        __struct.param_index = buf.get_i16_le();
23207        __struct.target_system = buf.get_u8();
23208        __struct.target_component = buf.get_u8();
23209        for v in &mut __struct.param_id {
23210            let val = buf.get_u8();
23211            *v = val;
23212        }
23213        Ok(__struct)
23214    }
23215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23216        let mut __tmp = BytesMut::new(bytes);
23217        #[allow(clippy::absurd_extreme_comparisons)]
23218        #[allow(unused_comparisons)]
23219        if __tmp.remaining() < Self::ENCODED_LEN {
23220            panic!(
23221                "buffer is too small (need {} bytes, but got {})",
23222                Self::ENCODED_LEN,
23223                __tmp.remaining(),
23224            )
23225        }
23226        __tmp.put_i16_le(self.param_index);
23227        __tmp.put_u8(self.target_system);
23228        __tmp.put_u8(self.target_component);
23229        for val in &self.param_id {
23230            __tmp.put_u8(*val);
23231        }
23232        if matches!(version, MavlinkVersion::V2) {
23233            let len = __tmp.len();
23234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23235        } else {
23236            __tmp.len()
23237        }
23238    }
23239}
23240#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23241#[doc = ""]
23242#[doc = "ID: 323"]
23243#[derive(Debug, Clone, PartialEq)]
23244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23246#[cfg_attr(feature = "ts", derive(TS))]
23247#[cfg_attr(feature = "ts", ts(export))]
23248pub struct PARAM_EXT_SET_DATA {
23249    #[doc = "System ID"]
23250    pub target_system: u8,
23251    #[doc = "Component ID"]
23252    pub target_component: u8,
23253    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23255    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23256    pub param_id: [u8; 16],
23257    #[doc = "Parameter value"]
23258    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23259    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23260    pub param_value: [u8; 128],
23261    #[doc = "Parameter type."]
23262    pub param_type: MavParamExtType,
23263}
23264impl PARAM_EXT_SET_DATA {
23265    pub const ENCODED_LEN: usize = 147usize;
23266    pub const DEFAULT: Self = Self {
23267        target_system: 0_u8,
23268        target_component: 0_u8,
23269        param_id: [0_u8; 16usize],
23270        param_value: [0_u8; 128usize],
23271        param_type: MavParamExtType::DEFAULT,
23272    };
23273    #[cfg(feature = "arbitrary")]
23274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23275        use arbitrary::{Arbitrary, Unstructured};
23276        let mut buf = [0u8; 1024];
23277        rng.fill_bytes(&mut buf);
23278        let mut unstructured = Unstructured::new(&buf);
23279        Self::arbitrary(&mut unstructured).unwrap_or_default()
23280    }
23281}
23282impl Default for PARAM_EXT_SET_DATA {
23283    fn default() -> Self {
23284        Self::DEFAULT.clone()
23285    }
23286}
23287impl MessageData for PARAM_EXT_SET_DATA {
23288    type Message = MavMessage;
23289    const ID: u32 = 323u32;
23290    const NAME: &'static str = "PARAM_EXT_SET";
23291    const EXTRA_CRC: u8 = 78u8;
23292    const ENCODED_LEN: usize = 147usize;
23293    fn deser(
23294        _version: MavlinkVersion,
23295        __input: &[u8],
23296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23297        let avail_len = __input.len();
23298        let mut payload_buf = [0; Self::ENCODED_LEN];
23299        let mut buf = if avail_len < Self::ENCODED_LEN {
23300            payload_buf[0..avail_len].copy_from_slice(__input);
23301            Bytes::new(&payload_buf)
23302        } else {
23303            Bytes::new(__input)
23304        };
23305        let mut __struct = Self::default();
23306        __struct.target_system = buf.get_u8();
23307        __struct.target_component = buf.get_u8();
23308        for v in &mut __struct.param_id {
23309            let val = buf.get_u8();
23310            *v = val;
23311        }
23312        for v in &mut __struct.param_value {
23313            let val = buf.get_u8();
23314            *v = val;
23315        }
23316        let tmp = buf.get_u8();
23317        __struct.param_type =
23318            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23319                enum_type: "MavParamExtType",
23320                value: tmp as u32,
23321            })?;
23322        Ok(__struct)
23323    }
23324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23325        let mut __tmp = BytesMut::new(bytes);
23326        #[allow(clippy::absurd_extreme_comparisons)]
23327        #[allow(unused_comparisons)]
23328        if __tmp.remaining() < Self::ENCODED_LEN {
23329            panic!(
23330                "buffer is too small (need {} bytes, but got {})",
23331                Self::ENCODED_LEN,
23332                __tmp.remaining(),
23333            )
23334        }
23335        __tmp.put_u8(self.target_system);
23336        __tmp.put_u8(self.target_component);
23337        for val in &self.param_id {
23338            __tmp.put_u8(*val);
23339        }
23340        for val in &self.param_value {
23341            __tmp.put_u8(*val);
23342        }
23343        __tmp.put_u8(self.param_type as u8);
23344        if matches!(version, MavlinkVersion::V2) {
23345            let len = __tmp.len();
23346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23347        } else {
23348            __tmp.len()
23349        }
23350    }
23351}
23352#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23353#[doc = ""]
23354#[doc = "ID: 322"]
23355#[derive(Debug, Clone, PartialEq)]
23356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23358#[cfg_attr(feature = "ts", derive(TS))]
23359#[cfg_attr(feature = "ts", ts(export))]
23360pub struct PARAM_EXT_VALUE_DATA {
23361    #[doc = "Total number of parameters"]
23362    pub param_count: u16,
23363    #[doc = "Index of this parameter"]
23364    pub param_index: u16,
23365    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23368    pub param_id: [u8; 16],
23369    #[doc = "Parameter value"]
23370    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23371    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23372    pub param_value: [u8; 128],
23373    #[doc = "Parameter type."]
23374    pub param_type: MavParamExtType,
23375}
23376impl PARAM_EXT_VALUE_DATA {
23377    pub const ENCODED_LEN: usize = 149usize;
23378    pub const DEFAULT: Self = Self {
23379        param_count: 0_u16,
23380        param_index: 0_u16,
23381        param_id: [0_u8; 16usize],
23382        param_value: [0_u8; 128usize],
23383        param_type: MavParamExtType::DEFAULT,
23384    };
23385    #[cfg(feature = "arbitrary")]
23386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23387        use arbitrary::{Arbitrary, Unstructured};
23388        let mut buf = [0u8; 1024];
23389        rng.fill_bytes(&mut buf);
23390        let mut unstructured = Unstructured::new(&buf);
23391        Self::arbitrary(&mut unstructured).unwrap_or_default()
23392    }
23393}
23394impl Default for PARAM_EXT_VALUE_DATA {
23395    fn default() -> Self {
23396        Self::DEFAULT.clone()
23397    }
23398}
23399impl MessageData for PARAM_EXT_VALUE_DATA {
23400    type Message = MavMessage;
23401    const ID: u32 = 322u32;
23402    const NAME: &'static str = "PARAM_EXT_VALUE";
23403    const EXTRA_CRC: u8 = 243u8;
23404    const ENCODED_LEN: usize = 149usize;
23405    fn deser(
23406        _version: MavlinkVersion,
23407        __input: &[u8],
23408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23409        let avail_len = __input.len();
23410        let mut payload_buf = [0; Self::ENCODED_LEN];
23411        let mut buf = if avail_len < Self::ENCODED_LEN {
23412            payload_buf[0..avail_len].copy_from_slice(__input);
23413            Bytes::new(&payload_buf)
23414        } else {
23415            Bytes::new(__input)
23416        };
23417        let mut __struct = Self::default();
23418        __struct.param_count = buf.get_u16_le();
23419        __struct.param_index = buf.get_u16_le();
23420        for v in &mut __struct.param_id {
23421            let val = buf.get_u8();
23422            *v = val;
23423        }
23424        for v in &mut __struct.param_value {
23425            let val = buf.get_u8();
23426            *v = val;
23427        }
23428        let tmp = buf.get_u8();
23429        __struct.param_type =
23430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23431                enum_type: "MavParamExtType",
23432                value: tmp as u32,
23433            })?;
23434        Ok(__struct)
23435    }
23436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23437        let mut __tmp = BytesMut::new(bytes);
23438        #[allow(clippy::absurd_extreme_comparisons)]
23439        #[allow(unused_comparisons)]
23440        if __tmp.remaining() < Self::ENCODED_LEN {
23441            panic!(
23442                "buffer is too small (need {} bytes, but got {})",
23443                Self::ENCODED_LEN,
23444                __tmp.remaining(),
23445            )
23446        }
23447        __tmp.put_u16_le(self.param_count);
23448        __tmp.put_u16_le(self.param_index);
23449        for val in &self.param_id {
23450            __tmp.put_u8(*val);
23451        }
23452        for val in &self.param_value {
23453            __tmp.put_u8(*val);
23454        }
23455        __tmp.put_u8(self.param_type as u8);
23456        if matches!(version, MavlinkVersion::V2) {
23457            let len = __tmp.len();
23458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23459        } else {
23460            __tmp.len()
23461        }
23462    }
23463}
23464#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23465#[doc = ""]
23466#[doc = "ID: 50"]
23467#[derive(Debug, Clone, PartialEq)]
23468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23470#[cfg_attr(feature = "ts", derive(TS))]
23471#[cfg_attr(feature = "ts", ts(export))]
23472pub struct PARAM_MAP_RC_DATA {
23473    #[doc = "Initial parameter value"]
23474    pub param_value0: f32,
23475    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23476    pub scale: f32,
23477    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23478    pub param_value_min: f32,
23479    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23480    pub param_value_max: f32,
23481    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23482    pub param_index: i16,
23483    #[doc = "System ID"]
23484    pub target_system: u8,
23485    #[doc = "Component ID"]
23486    pub target_component: u8,
23487    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23488    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23489    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23490    pub param_id: [u8; 16],
23491    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23492    pub parameter_rc_channel_index: u8,
23493}
23494impl PARAM_MAP_RC_DATA {
23495    pub const ENCODED_LEN: usize = 37usize;
23496    pub const DEFAULT: Self = Self {
23497        param_value0: 0.0_f32,
23498        scale: 0.0_f32,
23499        param_value_min: 0.0_f32,
23500        param_value_max: 0.0_f32,
23501        param_index: 0_i16,
23502        target_system: 0_u8,
23503        target_component: 0_u8,
23504        param_id: [0_u8; 16usize],
23505        parameter_rc_channel_index: 0_u8,
23506    };
23507    #[cfg(feature = "arbitrary")]
23508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23509        use arbitrary::{Arbitrary, Unstructured};
23510        let mut buf = [0u8; 1024];
23511        rng.fill_bytes(&mut buf);
23512        let mut unstructured = Unstructured::new(&buf);
23513        Self::arbitrary(&mut unstructured).unwrap_or_default()
23514    }
23515}
23516impl Default for PARAM_MAP_RC_DATA {
23517    fn default() -> Self {
23518        Self::DEFAULT.clone()
23519    }
23520}
23521impl MessageData for PARAM_MAP_RC_DATA {
23522    type Message = MavMessage;
23523    const ID: u32 = 50u32;
23524    const NAME: &'static str = "PARAM_MAP_RC";
23525    const EXTRA_CRC: u8 = 78u8;
23526    const ENCODED_LEN: usize = 37usize;
23527    fn deser(
23528        _version: MavlinkVersion,
23529        __input: &[u8],
23530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23531        let avail_len = __input.len();
23532        let mut payload_buf = [0; Self::ENCODED_LEN];
23533        let mut buf = if avail_len < Self::ENCODED_LEN {
23534            payload_buf[0..avail_len].copy_from_slice(__input);
23535            Bytes::new(&payload_buf)
23536        } else {
23537            Bytes::new(__input)
23538        };
23539        let mut __struct = Self::default();
23540        __struct.param_value0 = buf.get_f32_le();
23541        __struct.scale = buf.get_f32_le();
23542        __struct.param_value_min = buf.get_f32_le();
23543        __struct.param_value_max = buf.get_f32_le();
23544        __struct.param_index = buf.get_i16_le();
23545        __struct.target_system = buf.get_u8();
23546        __struct.target_component = buf.get_u8();
23547        for v in &mut __struct.param_id {
23548            let val = buf.get_u8();
23549            *v = val;
23550        }
23551        __struct.parameter_rc_channel_index = buf.get_u8();
23552        Ok(__struct)
23553    }
23554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23555        let mut __tmp = BytesMut::new(bytes);
23556        #[allow(clippy::absurd_extreme_comparisons)]
23557        #[allow(unused_comparisons)]
23558        if __tmp.remaining() < Self::ENCODED_LEN {
23559            panic!(
23560                "buffer is too small (need {} bytes, but got {})",
23561                Self::ENCODED_LEN,
23562                __tmp.remaining(),
23563            )
23564        }
23565        __tmp.put_f32_le(self.param_value0);
23566        __tmp.put_f32_le(self.scale);
23567        __tmp.put_f32_le(self.param_value_min);
23568        __tmp.put_f32_le(self.param_value_max);
23569        __tmp.put_i16_le(self.param_index);
23570        __tmp.put_u8(self.target_system);
23571        __tmp.put_u8(self.target_component);
23572        for val in &self.param_id {
23573            __tmp.put_u8(*val);
23574        }
23575        __tmp.put_u8(self.parameter_rc_channel_index);
23576        if matches!(version, MavlinkVersion::V2) {
23577            let len = __tmp.len();
23578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23579        } else {
23580            __tmp.len()
23581        }
23582    }
23583}
23584#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23585#[doc = ""]
23586#[doc = "ID: 21"]
23587#[derive(Debug, Clone, PartialEq)]
23588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23590#[cfg_attr(feature = "ts", derive(TS))]
23591#[cfg_attr(feature = "ts", ts(export))]
23592pub struct PARAM_REQUEST_LIST_DATA {
23593    #[doc = "System ID"]
23594    pub target_system: u8,
23595    #[doc = "Component ID"]
23596    pub target_component: u8,
23597}
23598impl PARAM_REQUEST_LIST_DATA {
23599    pub const ENCODED_LEN: usize = 2usize;
23600    pub const DEFAULT: Self = Self {
23601        target_system: 0_u8,
23602        target_component: 0_u8,
23603    };
23604    #[cfg(feature = "arbitrary")]
23605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23606        use arbitrary::{Arbitrary, Unstructured};
23607        let mut buf = [0u8; 1024];
23608        rng.fill_bytes(&mut buf);
23609        let mut unstructured = Unstructured::new(&buf);
23610        Self::arbitrary(&mut unstructured).unwrap_or_default()
23611    }
23612}
23613impl Default for PARAM_REQUEST_LIST_DATA {
23614    fn default() -> Self {
23615        Self::DEFAULT.clone()
23616    }
23617}
23618impl MessageData for PARAM_REQUEST_LIST_DATA {
23619    type Message = MavMessage;
23620    const ID: u32 = 21u32;
23621    const NAME: &'static str = "PARAM_REQUEST_LIST";
23622    const EXTRA_CRC: u8 = 159u8;
23623    const ENCODED_LEN: usize = 2usize;
23624    fn deser(
23625        _version: MavlinkVersion,
23626        __input: &[u8],
23627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23628        let avail_len = __input.len();
23629        let mut payload_buf = [0; Self::ENCODED_LEN];
23630        let mut buf = if avail_len < Self::ENCODED_LEN {
23631            payload_buf[0..avail_len].copy_from_slice(__input);
23632            Bytes::new(&payload_buf)
23633        } else {
23634            Bytes::new(__input)
23635        };
23636        let mut __struct = Self::default();
23637        __struct.target_system = buf.get_u8();
23638        __struct.target_component = buf.get_u8();
23639        Ok(__struct)
23640    }
23641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23642        let mut __tmp = BytesMut::new(bytes);
23643        #[allow(clippy::absurd_extreme_comparisons)]
23644        #[allow(unused_comparisons)]
23645        if __tmp.remaining() < Self::ENCODED_LEN {
23646            panic!(
23647                "buffer is too small (need {} bytes, but got {})",
23648                Self::ENCODED_LEN,
23649                __tmp.remaining(),
23650            )
23651        }
23652        __tmp.put_u8(self.target_system);
23653        __tmp.put_u8(self.target_component);
23654        if matches!(version, MavlinkVersion::V2) {
23655            let len = __tmp.len();
23656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23657        } else {
23658            __tmp.len()
23659        }
23660    }
23661}
23662#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23663#[doc = ""]
23664#[doc = "ID: 20"]
23665#[derive(Debug, Clone, PartialEq)]
23666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23668#[cfg_attr(feature = "ts", derive(TS))]
23669#[cfg_attr(feature = "ts", ts(export))]
23670pub struct PARAM_REQUEST_READ_DATA {
23671    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23672    pub param_index: i16,
23673    #[doc = "System ID"]
23674    pub target_system: u8,
23675    #[doc = "Component ID"]
23676    pub target_component: u8,
23677    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23679    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23680    pub param_id: [u8; 16],
23681}
23682impl PARAM_REQUEST_READ_DATA {
23683    pub const ENCODED_LEN: usize = 20usize;
23684    pub const DEFAULT: Self = Self {
23685        param_index: 0_i16,
23686        target_system: 0_u8,
23687        target_component: 0_u8,
23688        param_id: [0_u8; 16usize],
23689    };
23690    #[cfg(feature = "arbitrary")]
23691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23692        use arbitrary::{Arbitrary, Unstructured};
23693        let mut buf = [0u8; 1024];
23694        rng.fill_bytes(&mut buf);
23695        let mut unstructured = Unstructured::new(&buf);
23696        Self::arbitrary(&mut unstructured).unwrap_or_default()
23697    }
23698}
23699impl Default for PARAM_REQUEST_READ_DATA {
23700    fn default() -> Self {
23701        Self::DEFAULT.clone()
23702    }
23703}
23704impl MessageData for PARAM_REQUEST_READ_DATA {
23705    type Message = MavMessage;
23706    const ID: u32 = 20u32;
23707    const NAME: &'static str = "PARAM_REQUEST_READ";
23708    const EXTRA_CRC: u8 = 214u8;
23709    const ENCODED_LEN: usize = 20usize;
23710    fn deser(
23711        _version: MavlinkVersion,
23712        __input: &[u8],
23713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23714        let avail_len = __input.len();
23715        let mut payload_buf = [0; Self::ENCODED_LEN];
23716        let mut buf = if avail_len < Self::ENCODED_LEN {
23717            payload_buf[0..avail_len].copy_from_slice(__input);
23718            Bytes::new(&payload_buf)
23719        } else {
23720            Bytes::new(__input)
23721        };
23722        let mut __struct = Self::default();
23723        __struct.param_index = buf.get_i16_le();
23724        __struct.target_system = buf.get_u8();
23725        __struct.target_component = buf.get_u8();
23726        for v in &mut __struct.param_id {
23727            let val = buf.get_u8();
23728            *v = val;
23729        }
23730        Ok(__struct)
23731    }
23732    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23733        let mut __tmp = BytesMut::new(bytes);
23734        #[allow(clippy::absurd_extreme_comparisons)]
23735        #[allow(unused_comparisons)]
23736        if __tmp.remaining() < Self::ENCODED_LEN {
23737            panic!(
23738                "buffer is too small (need {} bytes, but got {})",
23739                Self::ENCODED_LEN,
23740                __tmp.remaining(),
23741            )
23742        }
23743        __tmp.put_i16_le(self.param_index);
23744        __tmp.put_u8(self.target_system);
23745        __tmp.put_u8(self.target_component);
23746        for val in &self.param_id {
23747            __tmp.put_u8(*val);
23748        }
23749        if matches!(version, MavlinkVersion::V2) {
23750            let len = __tmp.len();
23751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23752        } else {
23753            __tmp.len()
23754        }
23755    }
23756}
23757#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23758#[doc = ""]
23759#[doc = "ID: 23"]
23760#[derive(Debug, Clone, PartialEq)]
23761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23763#[cfg_attr(feature = "ts", derive(TS))]
23764#[cfg_attr(feature = "ts", ts(export))]
23765pub struct PARAM_SET_DATA {
23766    #[doc = "Onboard parameter value"]
23767    pub param_value: f32,
23768    #[doc = "System ID"]
23769    pub target_system: u8,
23770    #[doc = "Component ID"]
23771    pub target_component: u8,
23772    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23774    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23775    pub param_id: [u8; 16],
23776    #[doc = "Onboard parameter type."]
23777    pub param_type: MavParamType,
23778}
23779impl PARAM_SET_DATA {
23780    pub const ENCODED_LEN: usize = 23usize;
23781    pub const DEFAULT: Self = Self {
23782        param_value: 0.0_f32,
23783        target_system: 0_u8,
23784        target_component: 0_u8,
23785        param_id: [0_u8; 16usize],
23786        param_type: MavParamType::DEFAULT,
23787    };
23788    #[cfg(feature = "arbitrary")]
23789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23790        use arbitrary::{Arbitrary, Unstructured};
23791        let mut buf = [0u8; 1024];
23792        rng.fill_bytes(&mut buf);
23793        let mut unstructured = Unstructured::new(&buf);
23794        Self::arbitrary(&mut unstructured).unwrap_or_default()
23795    }
23796}
23797impl Default for PARAM_SET_DATA {
23798    fn default() -> Self {
23799        Self::DEFAULT.clone()
23800    }
23801}
23802impl MessageData for PARAM_SET_DATA {
23803    type Message = MavMessage;
23804    const ID: u32 = 23u32;
23805    const NAME: &'static str = "PARAM_SET";
23806    const EXTRA_CRC: u8 = 168u8;
23807    const ENCODED_LEN: usize = 23usize;
23808    fn deser(
23809        _version: MavlinkVersion,
23810        __input: &[u8],
23811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23812        let avail_len = __input.len();
23813        let mut payload_buf = [0; Self::ENCODED_LEN];
23814        let mut buf = if avail_len < Self::ENCODED_LEN {
23815            payload_buf[0..avail_len].copy_from_slice(__input);
23816            Bytes::new(&payload_buf)
23817        } else {
23818            Bytes::new(__input)
23819        };
23820        let mut __struct = Self::default();
23821        __struct.param_value = buf.get_f32_le();
23822        __struct.target_system = buf.get_u8();
23823        __struct.target_component = buf.get_u8();
23824        for v in &mut __struct.param_id {
23825            let val = buf.get_u8();
23826            *v = val;
23827        }
23828        let tmp = buf.get_u8();
23829        __struct.param_type =
23830            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23831                enum_type: "MavParamType",
23832                value: tmp as u32,
23833            })?;
23834        Ok(__struct)
23835    }
23836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23837        let mut __tmp = BytesMut::new(bytes);
23838        #[allow(clippy::absurd_extreme_comparisons)]
23839        #[allow(unused_comparisons)]
23840        if __tmp.remaining() < Self::ENCODED_LEN {
23841            panic!(
23842                "buffer is too small (need {} bytes, but got {})",
23843                Self::ENCODED_LEN,
23844                __tmp.remaining(),
23845            )
23846        }
23847        __tmp.put_f32_le(self.param_value);
23848        __tmp.put_u8(self.target_system);
23849        __tmp.put_u8(self.target_component);
23850        for val in &self.param_id {
23851            __tmp.put_u8(*val);
23852        }
23853        __tmp.put_u8(self.param_type as u8);
23854        if matches!(version, MavlinkVersion::V2) {
23855            let len = __tmp.len();
23856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23857        } else {
23858            __tmp.len()
23859        }
23860    }
23861}
23862#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23863#[doc = ""]
23864#[doc = "ID: 22"]
23865#[derive(Debug, Clone, PartialEq)]
23866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23868#[cfg_attr(feature = "ts", derive(TS))]
23869#[cfg_attr(feature = "ts", ts(export))]
23870pub struct PARAM_VALUE_DATA {
23871    #[doc = "Onboard parameter value"]
23872    pub param_value: f32,
23873    #[doc = "Total number of onboard parameters"]
23874    pub param_count: u16,
23875    #[doc = "Index of this onboard parameter"]
23876    pub param_index: u16,
23877    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23879    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23880    pub param_id: [u8; 16],
23881    #[doc = "Onboard parameter type."]
23882    pub param_type: MavParamType,
23883}
23884impl PARAM_VALUE_DATA {
23885    pub const ENCODED_LEN: usize = 25usize;
23886    pub const DEFAULT: Self = Self {
23887        param_value: 0.0_f32,
23888        param_count: 0_u16,
23889        param_index: 0_u16,
23890        param_id: [0_u8; 16usize],
23891        param_type: MavParamType::DEFAULT,
23892    };
23893    #[cfg(feature = "arbitrary")]
23894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23895        use arbitrary::{Arbitrary, Unstructured};
23896        let mut buf = [0u8; 1024];
23897        rng.fill_bytes(&mut buf);
23898        let mut unstructured = Unstructured::new(&buf);
23899        Self::arbitrary(&mut unstructured).unwrap_or_default()
23900    }
23901}
23902impl Default for PARAM_VALUE_DATA {
23903    fn default() -> Self {
23904        Self::DEFAULT.clone()
23905    }
23906}
23907impl MessageData for PARAM_VALUE_DATA {
23908    type Message = MavMessage;
23909    const ID: u32 = 22u32;
23910    const NAME: &'static str = "PARAM_VALUE";
23911    const EXTRA_CRC: u8 = 220u8;
23912    const ENCODED_LEN: usize = 25usize;
23913    fn deser(
23914        _version: MavlinkVersion,
23915        __input: &[u8],
23916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23917        let avail_len = __input.len();
23918        let mut payload_buf = [0; Self::ENCODED_LEN];
23919        let mut buf = if avail_len < Self::ENCODED_LEN {
23920            payload_buf[0..avail_len].copy_from_slice(__input);
23921            Bytes::new(&payload_buf)
23922        } else {
23923            Bytes::new(__input)
23924        };
23925        let mut __struct = Self::default();
23926        __struct.param_value = buf.get_f32_le();
23927        __struct.param_count = buf.get_u16_le();
23928        __struct.param_index = buf.get_u16_le();
23929        for v in &mut __struct.param_id {
23930            let val = buf.get_u8();
23931            *v = val;
23932        }
23933        let tmp = buf.get_u8();
23934        __struct.param_type =
23935            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23936                enum_type: "MavParamType",
23937                value: tmp as u32,
23938            })?;
23939        Ok(__struct)
23940    }
23941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23942        let mut __tmp = BytesMut::new(bytes);
23943        #[allow(clippy::absurd_extreme_comparisons)]
23944        #[allow(unused_comparisons)]
23945        if __tmp.remaining() < Self::ENCODED_LEN {
23946            panic!(
23947                "buffer is too small (need {} bytes, but got {})",
23948                Self::ENCODED_LEN,
23949                __tmp.remaining(),
23950            )
23951        }
23952        __tmp.put_f32_le(self.param_value);
23953        __tmp.put_u16_le(self.param_count);
23954        __tmp.put_u16_le(self.param_index);
23955        for val in &self.param_id {
23956            __tmp.put_u8(*val);
23957        }
23958        __tmp.put_u8(self.param_type as u8);
23959        if matches!(version, MavlinkVersion::V2) {
23960            let len = __tmp.len();
23961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23962        } else {
23963            __tmp.len()
23964        }
23965    }
23966}
23967#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23968#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23969#[doc = ""]
23970#[doc = "ID: 4"]
23971#[derive(Debug, Clone, PartialEq)]
23972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23974#[cfg_attr(feature = "ts", derive(TS))]
23975#[cfg_attr(feature = "ts", ts(export))]
23976pub struct PING_DATA {
23977    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23978    pub time_usec: u64,
23979    #[doc = "PING sequence"]
23980    pub seq: u32,
23981    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23982    pub target_system: u8,
23983    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23984    pub target_component: u8,
23985}
23986impl PING_DATA {
23987    pub const ENCODED_LEN: usize = 14usize;
23988    pub const DEFAULT: Self = Self {
23989        time_usec: 0_u64,
23990        seq: 0_u32,
23991        target_system: 0_u8,
23992        target_component: 0_u8,
23993    };
23994    #[cfg(feature = "arbitrary")]
23995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23996        use arbitrary::{Arbitrary, Unstructured};
23997        let mut buf = [0u8; 1024];
23998        rng.fill_bytes(&mut buf);
23999        let mut unstructured = Unstructured::new(&buf);
24000        Self::arbitrary(&mut unstructured).unwrap_or_default()
24001    }
24002}
24003impl Default for PING_DATA {
24004    fn default() -> Self {
24005        Self::DEFAULT.clone()
24006    }
24007}
24008impl MessageData for PING_DATA {
24009    type Message = MavMessage;
24010    const ID: u32 = 4u32;
24011    const NAME: &'static str = "PING";
24012    const EXTRA_CRC: u8 = 237u8;
24013    const ENCODED_LEN: usize = 14usize;
24014    fn deser(
24015        _version: MavlinkVersion,
24016        __input: &[u8],
24017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24018        let avail_len = __input.len();
24019        let mut payload_buf = [0; Self::ENCODED_LEN];
24020        let mut buf = if avail_len < Self::ENCODED_LEN {
24021            payload_buf[0..avail_len].copy_from_slice(__input);
24022            Bytes::new(&payload_buf)
24023        } else {
24024            Bytes::new(__input)
24025        };
24026        let mut __struct = Self::default();
24027        __struct.time_usec = buf.get_u64_le();
24028        __struct.seq = buf.get_u32_le();
24029        __struct.target_system = buf.get_u8();
24030        __struct.target_component = buf.get_u8();
24031        Ok(__struct)
24032    }
24033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24034        let mut __tmp = BytesMut::new(bytes);
24035        #[allow(clippy::absurd_extreme_comparisons)]
24036        #[allow(unused_comparisons)]
24037        if __tmp.remaining() < Self::ENCODED_LEN {
24038            panic!(
24039                "buffer is too small (need {} bytes, but got {})",
24040                Self::ENCODED_LEN,
24041                __tmp.remaining(),
24042            )
24043        }
24044        __tmp.put_u64_le(self.time_usec);
24045        __tmp.put_u32_le(self.seq);
24046        __tmp.put_u8(self.target_system);
24047        __tmp.put_u8(self.target_component);
24048        if matches!(version, MavlinkVersion::V2) {
24049            let len = __tmp.len();
24050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24051        } else {
24052            __tmp.len()
24053        }
24054    }
24055}
24056#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24057#[doc = "Control vehicle tone generation (buzzer)."]
24058#[doc = ""]
24059#[doc = "ID: 258"]
24060#[derive(Debug, Clone, PartialEq)]
24061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24063#[cfg_attr(feature = "ts", derive(TS))]
24064#[cfg_attr(feature = "ts", ts(export))]
24065pub struct PLAY_TUNE_DATA {
24066    #[doc = "System ID"]
24067    pub target_system: u8,
24068    #[doc = "Component ID"]
24069    pub target_component: u8,
24070    #[doc = "tune in board specific format"]
24071    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24072    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24073    pub tune: [u8; 30],
24074    #[doc = "tune extension (appended to tune)"]
24075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24076    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24077    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24078    pub tune2: [u8; 200],
24079}
24080impl PLAY_TUNE_DATA {
24081    pub const ENCODED_LEN: usize = 232usize;
24082    pub const DEFAULT: Self = Self {
24083        target_system: 0_u8,
24084        target_component: 0_u8,
24085        tune: [0_u8; 30usize],
24086        tune2: [0_u8; 200usize],
24087    };
24088    #[cfg(feature = "arbitrary")]
24089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24090        use arbitrary::{Arbitrary, Unstructured};
24091        let mut buf = [0u8; 1024];
24092        rng.fill_bytes(&mut buf);
24093        let mut unstructured = Unstructured::new(&buf);
24094        Self::arbitrary(&mut unstructured).unwrap_or_default()
24095    }
24096}
24097impl Default for PLAY_TUNE_DATA {
24098    fn default() -> Self {
24099        Self::DEFAULT.clone()
24100    }
24101}
24102impl MessageData for PLAY_TUNE_DATA {
24103    type Message = MavMessage;
24104    const ID: u32 = 258u32;
24105    const NAME: &'static str = "PLAY_TUNE";
24106    const EXTRA_CRC: u8 = 187u8;
24107    const ENCODED_LEN: usize = 232usize;
24108    fn deser(
24109        _version: MavlinkVersion,
24110        __input: &[u8],
24111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24112        let avail_len = __input.len();
24113        let mut payload_buf = [0; Self::ENCODED_LEN];
24114        let mut buf = if avail_len < Self::ENCODED_LEN {
24115            payload_buf[0..avail_len].copy_from_slice(__input);
24116            Bytes::new(&payload_buf)
24117        } else {
24118            Bytes::new(__input)
24119        };
24120        let mut __struct = Self::default();
24121        __struct.target_system = buf.get_u8();
24122        __struct.target_component = buf.get_u8();
24123        for v in &mut __struct.tune {
24124            let val = buf.get_u8();
24125            *v = val;
24126        }
24127        for v in &mut __struct.tune2 {
24128            let val = buf.get_u8();
24129            *v = val;
24130        }
24131        Ok(__struct)
24132    }
24133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24134        let mut __tmp = BytesMut::new(bytes);
24135        #[allow(clippy::absurd_extreme_comparisons)]
24136        #[allow(unused_comparisons)]
24137        if __tmp.remaining() < Self::ENCODED_LEN {
24138            panic!(
24139                "buffer is too small (need {} bytes, but got {})",
24140                Self::ENCODED_LEN,
24141                __tmp.remaining(),
24142            )
24143        }
24144        __tmp.put_u8(self.target_system);
24145        __tmp.put_u8(self.target_component);
24146        for val in &self.tune {
24147            __tmp.put_u8(*val);
24148        }
24149        if matches!(version, MavlinkVersion::V2) {
24150            for val in &self.tune2 {
24151                __tmp.put_u8(*val);
24152            }
24153            let len = __tmp.len();
24154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24155        } else {
24156            __tmp.len()
24157        }
24158    }
24159}
24160#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24161#[doc = ""]
24162#[doc = "ID: 400"]
24163#[derive(Debug, Clone, PartialEq)]
24164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24166#[cfg_attr(feature = "ts", derive(TS))]
24167#[cfg_attr(feature = "ts", ts(export))]
24168pub struct PLAY_TUNE_V2_DATA {
24169    #[doc = "Tune format"]
24170    pub format: TuneFormat,
24171    #[doc = "System ID"]
24172    pub target_system: u8,
24173    #[doc = "Component ID"]
24174    pub target_component: u8,
24175    #[doc = "Tune definition as a NULL-terminated string."]
24176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24177    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24178    pub tune: [u8; 248],
24179}
24180impl PLAY_TUNE_V2_DATA {
24181    pub const ENCODED_LEN: usize = 254usize;
24182    pub const DEFAULT: Self = Self {
24183        format: TuneFormat::DEFAULT,
24184        target_system: 0_u8,
24185        target_component: 0_u8,
24186        tune: [0_u8; 248usize],
24187    };
24188    #[cfg(feature = "arbitrary")]
24189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24190        use arbitrary::{Arbitrary, Unstructured};
24191        let mut buf = [0u8; 1024];
24192        rng.fill_bytes(&mut buf);
24193        let mut unstructured = Unstructured::new(&buf);
24194        Self::arbitrary(&mut unstructured).unwrap_or_default()
24195    }
24196}
24197impl Default for PLAY_TUNE_V2_DATA {
24198    fn default() -> Self {
24199        Self::DEFAULT.clone()
24200    }
24201}
24202impl MessageData for PLAY_TUNE_V2_DATA {
24203    type Message = MavMessage;
24204    const ID: u32 = 400u32;
24205    const NAME: &'static str = "PLAY_TUNE_V2";
24206    const EXTRA_CRC: u8 = 110u8;
24207    const ENCODED_LEN: usize = 254usize;
24208    fn deser(
24209        _version: MavlinkVersion,
24210        __input: &[u8],
24211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24212        let avail_len = __input.len();
24213        let mut payload_buf = [0; Self::ENCODED_LEN];
24214        let mut buf = if avail_len < Self::ENCODED_LEN {
24215            payload_buf[0..avail_len].copy_from_slice(__input);
24216            Bytes::new(&payload_buf)
24217        } else {
24218            Bytes::new(__input)
24219        };
24220        let mut __struct = Self::default();
24221        let tmp = buf.get_u32_le();
24222        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24223            ::mavlink_core::error::ParserError::InvalidEnum {
24224                enum_type: "TuneFormat",
24225                value: tmp as u32,
24226            },
24227        )?;
24228        __struct.target_system = buf.get_u8();
24229        __struct.target_component = buf.get_u8();
24230        for v in &mut __struct.tune {
24231            let val = buf.get_u8();
24232            *v = val;
24233        }
24234        Ok(__struct)
24235    }
24236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24237        let mut __tmp = BytesMut::new(bytes);
24238        #[allow(clippy::absurd_extreme_comparisons)]
24239        #[allow(unused_comparisons)]
24240        if __tmp.remaining() < Self::ENCODED_LEN {
24241            panic!(
24242                "buffer is too small (need {} bytes, but got {})",
24243                Self::ENCODED_LEN,
24244                __tmp.remaining(),
24245            )
24246        }
24247        __tmp.put_u32_le(self.format as u32);
24248        __tmp.put_u8(self.target_system);
24249        __tmp.put_u8(self.target_component);
24250        for val in &self.tune {
24251            __tmp.put_u8(*val);
24252        }
24253        if matches!(version, MavlinkVersion::V2) {
24254            let len = __tmp.len();
24255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24256        } else {
24257            __tmp.len()
24258        }
24259    }
24260}
24261#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24262#[doc = ""]
24263#[doc = "ID: 87"]
24264#[derive(Debug, Clone, PartialEq)]
24265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24267#[cfg_attr(feature = "ts", derive(TS))]
24268#[cfg_attr(feature = "ts", ts(export))]
24269pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24270    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24271    pub time_boot_ms: u32,
24272    #[doc = "Latitude in WGS84 frame"]
24273    pub lat_int: i32,
24274    #[doc = "Longitude in WGS84 frame"]
24275    pub lon_int: i32,
24276    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24277    pub alt: f32,
24278    #[doc = "X velocity in NED frame"]
24279    pub vx: f32,
24280    #[doc = "Y velocity in NED frame"]
24281    pub vy: f32,
24282    #[doc = "Z velocity in NED frame"]
24283    pub vz: f32,
24284    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24285    pub afx: f32,
24286    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24287    pub afy: f32,
24288    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24289    pub afz: f32,
24290    #[doc = "yaw setpoint"]
24291    pub yaw: f32,
24292    #[doc = "yaw rate setpoint"]
24293    pub yaw_rate: f32,
24294    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24295    pub type_mask: PositionTargetTypemask,
24296    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24297    pub coordinate_frame: MavFrame,
24298}
24299impl POSITION_TARGET_GLOBAL_INT_DATA {
24300    pub const ENCODED_LEN: usize = 51usize;
24301    pub const DEFAULT: Self = Self {
24302        time_boot_ms: 0_u32,
24303        lat_int: 0_i32,
24304        lon_int: 0_i32,
24305        alt: 0.0_f32,
24306        vx: 0.0_f32,
24307        vy: 0.0_f32,
24308        vz: 0.0_f32,
24309        afx: 0.0_f32,
24310        afy: 0.0_f32,
24311        afz: 0.0_f32,
24312        yaw: 0.0_f32,
24313        yaw_rate: 0.0_f32,
24314        type_mask: PositionTargetTypemask::DEFAULT,
24315        coordinate_frame: MavFrame::DEFAULT,
24316    };
24317    #[cfg(feature = "arbitrary")]
24318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24319        use arbitrary::{Arbitrary, Unstructured};
24320        let mut buf = [0u8; 1024];
24321        rng.fill_bytes(&mut buf);
24322        let mut unstructured = Unstructured::new(&buf);
24323        Self::arbitrary(&mut unstructured).unwrap_or_default()
24324    }
24325}
24326impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24327    fn default() -> Self {
24328        Self::DEFAULT.clone()
24329    }
24330}
24331impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24332    type Message = MavMessage;
24333    const ID: u32 = 87u32;
24334    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24335    const EXTRA_CRC: u8 = 150u8;
24336    const ENCODED_LEN: usize = 51usize;
24337    fn deser(
24338        _version: MavlinkVersion,
24339        __input: &[u8],
24340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24341        let avail_len = __input.len();
24342        let mut payload_buf = [0; Self::ENCODED_LEN];
24343        let mut buf = if avail_len < Self::ENCODED_LEN {
24344            payload_buf[0..avail_len].copy_from_slice(__input);
24345            Bytes::new(&payload_buf)
24346        } else {
24347            Bytes::new(__input)
24348        };
24349        let mut __struct = Self::default();
24350        __struct.time_boot_ms = buf.get_u32_le();
24351        __struct.lat_int = buf.get_i32_le();
24352        __struct.lon_int = buf.get_i32_le();
24353        __struct.alt = buf.get_f32_le();
24354        __struct.vx = buf.get_f32_le();
24355        __struct.vy = buf.get_f32_le();
24356        __struct.vz = buf.get_f32_le();
24357        __struct.afx = buf.get_f32_le();
24358        __struct.afy = buf.get_f32_le();
24359        __struct.afz = buf.get_f32_le();
24360        __struct.yaw = buf.get_f32_le();
24361        __struct.yaw_rate = buf.get_f32_le();
24362        let tmp = buf.get_u16_le();
24363        __struct.type_mask = PositionTargetTypemask::from_bits(
24364            tmp & PositionTargetTypemask::all().bits(),
24365        )
24366        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24367            flag_type: "PositionTargetTypemask",
24368            value: tmp as u32,
24369        })?;
24370        let tmp = buf.get_u8();
24371        __struct.coordinate_frame =
24372            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24373                enum_type: "MavFrame",
24374                value: tmp as u32,
24375            })?;
24376        Ok(__struct)
24377    }
24378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24379        let mut __tmp = BytesMut::new(bytes);
24380        #[allow(clippy::absurd_extreme_comparisons)]
24381        #[allow(unused_comparisons)]
24382        if __tmp.remaining() < Self::ENCODED_LEN {
24383            panic!(
24384                "buffer is too small (need {} bytes, but got {})",
24385                Self::ENCODED_LEN,
24386                __tmp.remaining(),
24387            )
24388        }
24389        __tmp.put_u32_le(self.time_boot_ms);
24390        __tmp.put_i32_le(self.lat_int);
24391        __tmp.put_i32_le(self.lon_int);
24392        __tmp.put_f32_le(self.alt);
24393        __tmp.put_f32_le(self.vx);
24394        __tmp.put_f32_le(self.vy);
24395        __tmp.put_f32_le(self.vz);
24396        __tmp.put_f32_le(self.afx);
24397        __tmp.put_f32_le(self.afy);
24398        __tmp.put_f32_le(self.afz);
24399        __tmp.put_f32_le(self.yaw);
24400        __tmp.put_f32_le(self.yaw_rate);
24401        __tmp.put_u16_le(self.type_mask.bits());
24402        __tmp.put_u8(self.coordinate_frame as u8);
24403        if matches!(version, MavlinkVersion::V2) {
24404            let len = __tmp.len();
24405            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24406        } else {
24407            __tmp.len()
24408        }
24409    }
24410}
24411#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24412#[doc = ""]
24413#[doc = "ID: 85"]
24414#[derive(Debug, Clone, PartialEq)]
24415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24417#[cfg_attr(feature = "ts", derive(TS))]
24418#[cfg_attr(feature = "ts", ts(export))]
24419pub struct POSITION_TARGET_LOCAL_NED_DATA {
24420    #[doc = "Timestamp (time since system boot)."]
24421    pub time_boot_ms: u32,
24422    #[doc = "X Position in NED frame"]
24423    pub x: f32,
24424    #[doc = "Y Position in NED frame"]
24425    pub y: f32,
24426    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24427    pub z: f32,
24428    #[doc = "X velocity in NED frame"]
24429    pub vx: f32,
24430    #[doc = "Y velocity in NED frame"]
24431    pub vy: f32,
24432    #[doc = "Z velocity in NED frame"]
24433    pub vz: f32,
24434    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24435    pub afx: f32,
24436    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24437    pub afy: f32,
24438    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24439    pub afz: f32,
24440    #[doc = "yaw setpoint"]
24441    pub yaw: f32,
24442    #[doc = "yaw rate setpoint"]
24443    pub yaw_rate: f32,
24444    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24445    pub type_mask: PositionTargetTypemask,
24446    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24447    pub coordinate_frame: MavFrame,
24448}
24449impl POSITION_TARGET_LOCAL_NED_DATA {
24450    pub const ENCODED_LEN: usize = 51usize;
24451    pub const DEFAULT: Self = Self {
24452        time_boot_ms: 0_u32,
24453        x: 0.0_f32,
24454        y: 0.0_f32,
24455        z: 0.0_f32,
24456        vx: 0.0_f32,
24457        vy: 0.0_f32,
24458        vz: 0.0_f32,
24459        afx: 0.0_f32,
24460        afy: 0.0_f32,
24461        afz: 0.0_f32,
24462        yaw: 0.0_f32,
24463        yaw_rate: 0.0_f32,
24464        type_mask: PositionTargetTypemask::DEFAULT,
24465        coordinate_frame: MavFrame::DEFAULT,
24466    };
24467    #[cfg(feature = "arbitrary")]
24468    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24469        use arbitrary::{Arbitrary, Unstructured};
24470        let mut buf = [0u8; 1024];
24471        rng.fill_bytes(&mut buf);
24472        let mut unstructured = Unstructured::new(&buf);
24473        Self::arbitrary(&mut unstructured).unwrap_or_default()
24474    }
24475}
24476impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24477    fn default() -> Self {
24478        Self::DEFAULT.clone()
24479    }
24480}
24481impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24482    type Message = MavMessage;
24483    const ID: u32 = 85u32;
24484    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24485    const EXTRA_CRC: u8 = 140u8;
24486    const ENCODED_LEN: usize = 51usize;
24487    fn deser(
24488        _version: MavlinkVersion,
24489        __input: &[u8],
24490    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24491        let avail_len = __input.len();
24492        let mut payload_buf = [0; Self::ENCODED_LEN];
24493        let mut buf = if avail_len < Self::ENCODED_LEN {
24494            payload_buf[0..avail_len].copy_from_slice(__input);
24495            Bytes::new(&payload_buf)
24496        } else {
24497            Bytes::new(__input)
24498        };
24499        let mut __struct = Self::default();
24500        __struct.time_boot_ms = buf.get_u32_le();
24501        __struct.x = buf.get_f32_le();
24502        __struct.y = buf.get_f32_le();
24503        __struct.z = buf.get_f32_le();
24504        __struct.vx = buf.get_f32_le();
24505        __struct.vy = buf.get_f32_le();
24506        __struct.vz = buf.get_f32_le();
24507        __struct.afx = buf.get_f32_le();
24508        __struct.afy = buf.get_f32_le();
24509        __struct.afz = buf.get_f32_le();
24510        __struct.yaw = buf.get_f32_le();
24511        __struct.yaw_rate = buf.get_f32_le();
24512        let tmp = buf.get_u16_le();
24513        __struct.type_mask = PositionTargetTypemask::from_bits(
24514            tmp & PositionTargetTypemask::all().bits(),
24515        )
24516        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24517            flag_type: "PositionTargetTypemask",
24518            value: tmp as u32,
24519        })?;
24520        let tmp = buf.get_u8();
24521        __struct.coordinate_frame =
24522            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24523                enum_type: "MavFrame",
24524                value: tmp as u32,
24525            })?;
24526        Ok(__struct)
24527    }
24528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24529        let mut __tmp = BytesMut::new(bytes);
24530        #[allow(clippy::absurd_extreme_comparisons)]
24531        #[allow(unused_comparisons)]
24532        if __tmp.remaining() < Self::ENCODED_LEN {
24533            panic!(
24534                "buffer is too small (need {} bytes, but got {})",
24535                Self::ENCODED_LEN,
24536                __tmp.remaining(),
24537            )
24538        }
24539        __tmp.put_u32_le(self.time_boot_ms);
24540        __tmp.put_f32_le(self.x);
24541        __tmp.put_f32_le(self.y);
24542        __tmp.put_f32_le(self.z);
24543        __tmp.put_f32_le(self.vx);
24544        __tmp.put_f32_le(self.vy);
24545        __tmp.put_f32_le(self.vz);
24546        __tmp.put_f32_le(self.afx);
24547        __tmp.put_f32_le(self.afy);
24548        __tmp.put_f32_le(self.afz);
24549        __tmp.put_f32_le(self.yaw);
24550        __tmp.put_f32_le(self.yaw_rate);
24551        __tmp.put_u16_le(self.type_mask.bits());
24552        __tmp.put_u8(self.coordinate_frame as u8);
24553        if matches!(version, MavlinkVersion::V2) {
24554            let len = __tmp.len();
24555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24556        } else {
24557            __tmp.len()
24558        }
24559    }
24560}
24561#[doc = "Power supply status."]
24562#[doc = ""]
24563#[doc = "ID: 125"]
24564#[derive(Debug, Clone, PartialEq)]
24565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24567#[cfg_attr(feature = "ts", derive(TS))]
24568#[cfg_attr(feature = "ts", ts(export))]
24569pub struct POWER_STATUS_DATA {
24570    #[doc = "5V rail voltage."]
24571    pub Vcc: u16,
24572    #[doc = "Servo rail voltage."]
24573    pub Vservo: u16,
24574    #[doc = "Bitmap of power supply status flags."]
24575    pub flags: MavPowerStatus,
24576}
24577impl POWER_STATUS_DATA {
24578    pub const ENCODED_LEN: usize = 6usize;
24579    pub const DEFAULT: Self = Self {
24580        Vcc: 0_u16,
24581        Vservo: 0_u16,
24582        flags: MavPowerStatus::DEFAULT,
24583    };
24584    #[cfg(feature = "arbitrary")]
24585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24586        use arbitrary::{Arbitrary, Unstructured};
24587        let mut buf = [0u8; 1024];
24588        rng.fill_bytes(&mut buf);
24589        let mut unstructured = Unstructured::new(&buf);
24590        Self::arbitrary(&mut unstructured).unwrap_or_default()
24591    }
24592}
24593impl Default for POWER_STATUS_DATA {
24594    fn default() -> Self {
24595        Self::DEFAULT.clone()
24596    }
24597}
24598impl MessageData for POWER_STATUS_DATA {
24599    type Message = MavMessage;
24600    const ID: u32 = 125u32;
24601    const NAME: &'static str = "POWER_STATUS";
24602    const EXTRA_CRC: u8 = 203u8;
24603    const ENCODED_LEN: usize = 6usize;
24604    fn deser(
24605        _version: MavlinkVersion,
24606        __input: &[u8],
24607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24608        let avail_len = __input.len();
24609        let mut payload_buf = [0; Self::ENCODED_LEN];
24610        let mut buf = if avail_len < Self::ENCODED_LEN {
24611            payload_buf[0..avail_len].copy_from_slice(__input);
24612            Bytes::new(&payload_buf)
24613        } else {
24614            Bytes::new(__input)
24615        };
24616        let mut __struct = Self::default();
24617        __struct.Vcc = buf.get_u16_le();
24618        __struct.Vservo = buf.get_u16_le();
24619        let tmp = buf.get_u16_le();
24620        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24621            ::mavlink_core::error::ParserError::InvalidFlag {
24622                flag_type: "MavPowerStatus",
24623                value: tmp as u32,
24624            },
24625        )?;
24626        Ok(__struct)
24627    }
24628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24629        let mut __tmp = BytesMut::new(bytes);
24630        #[allow(clippy::absurd_extreme_comparisons)]
24631        #[allow(unused_comparisons)]
24632        if __tmp.remaining() < Self::ENCODED_LEN {
24633            panic!(
24634                "buffer is too small (need {} bytes, but got {})",
24635                Self::ENCODED_LEN,
24636                __tmp.remaining(),
24637            )
24638        }
24639        __tmp.put_u16_le(self.Vcc);
24640        __tmp.put_u16_le(self.Vservo);
24641        __tmp.put_u16_le(self.flags.bits());
24642        if matches!(version, MavlinkVersion::V2) {
24643            let len = __tmp.len();
24644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24645        } else {
24646            __tmp.len()
24647        }
24648    }
24649}
24650#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24651#[doc = ""]
24652#[doc = "ID: 300"]
24653#[derive(Debug, Clone, PartialEq)]
24654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24656#[cfg_attr(feature = "ts", derive(TS))]
24657#[cfg_attr(feature = "ts", ts(export))]
24658pub struct PROTOCOL_VERSION_DATA {
24659    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24660    pub version: u16,
24661    #[doc = "Minimum MAVLink version supported"]
24662    pub min_version: u16,
24663    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24664    pub max_version: u16,
24665    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24666    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24667    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24668    pub spec_version_hash: [u8; 8],
24669    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24671    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24672    pub library_version_hash: [u8; 8],
24673}
24674impl PROTOCOL_VERSION_DATA {
24675    pub const ENCODED_LEN: usize = 22usize;
24676    pub const DEFAULT: Self = Self {
24677        version: 0_u16,
24678        min_version: 0_u16,
24679        max_version: 0_u16,
24680        spec_version_hash: [0_u8; 8usize],
24681        library_version_hash: [0_u8; 8usize],
24682    };
24683    #[cfg(feature = "arbitrary")]
24684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24685        use arbitrary::{Arbitrary, Unstructured};
24686        let mut buf = [0u8; 1024];
24687        rng.fill_bytes(&mut buf);
24688        let mut unstructured = Unstructured::new(&buf);
24689        Self::arbitrary(&mut unstructured).unwrap_or_default()
24690    }
24691}
24692impl Default for PROTOCOL_VERSION_DATA {
24693    fn default() -> Self {
24694        Self::DEFAULT.clone()
24695    }
24696}
24697impl MessageData for PROTOCOL_VERSION_DATA {
24698    type Message = MavMessage;
24699    const ID: u32 = 300u32;
24700    const NAME: &'static str = "PROTOCOL_VERSION";
24701    const EXTRA_CRC: u8 = 217u8;
24702    const ENCODED_LEN: usize = 22usize;
24703    fn deser(
24704        _version: MavlinkVersion,
24705        __input: &[u8],
24706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24707        let avail_len = __input.len();
24708        let mut payload_buf = [0; Self::ENCODED_LEN];
24709        let mut buf = if avail_len < Self::ENCODED_LEN {
24710            payload_buf[0..avail_len].copy_from_slice(__input);
24711            Bytes::new(&payload_buf)
24712        } else {
24713            Bytes::new(__input)
24714        };
24715        let mut __struct = Self::default();
24716        __struct.version = buf.get_u16_le();
24717        __struct.min_version = buf.get_u16_le();
24718        __struct.max_version = buf.get_u16_le();
24719        for v in &mut __struct.spec_version_hash {
24720            let val = buf.get_u8();
24721            *v = val;
24722        }
24723        for v in &mut __struct.library_version_hash {
24724            let val = buf.get_u8();
24725            *v = val;
24726        }
24727        Ok(__struct)
24728    }
24729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24730        let mut __tmp = BytesMut::new(bytes);
24731        #[allow(clippy::absurd_extreme_comparisons)]
24732        #[allow(unused_comparisons)]
24733        if __tmp.remaining() < Self::ENCODED_LEN {
24734            panic!(
24735                "buffer is too small (need {} bytes, but got {})",
24736                Self::ENCODED_LEN,
24737                __tmp.remaining(),
24738            )
24739        }
24740        __tmp.put_u16_le(self.version);
24741        __tmp.put_u16_le(self.min_version);
24742        __tmp.put_u16_le(self.max_version);
24743        for val in &self.spec_version_hash {
24744            __tmp.put_u8(*val);
24745        }
24746        for val in &self.library_version_hash {
24747            __tmp.put_u8(*val);
24748        }
24749        if matches!(version, MavlinkVersion::V2) {
24750            let len = __tmp.len();
24751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24752        } else {
24753            __tmp.len()
24754        }
24755    }
24756}
24757#[doc = "Status generated by radio and injected into MAVLink stream."]
24758#[doc = ""]
24759#[doc = "ID: 109"]
24760#[derive(Debug, Clone, PartialEq)]
24761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24763#[cfg_attr(feature = "ts", derive(TS))]
24764#[cfg_attr(feature = "ts", ts(export))]
24765pub struct RADIO_STATUS_DATA {
24766    #[doc = "Count of radio packet receive errors (since boot)."]
24767    pub rxerrors: u16,
24768    #[doc = "Count of error corrected radio packets (since boot)."]
24769    pub fixed: u16,
24770    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24771    pub rssi: u8,
24772    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24773    pub remrssi: u8,
24774    #[doc = "Remaining free transmitter buffer space."]
24775    pub txbuf: u8,
24776    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24777    pub noise: u8,
24778    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24779    pub remnoise: u8,
24780}
24781impl RADIO_STATUS_DATA {
24782    pub const ENCODED_LEN: usize = 9usize;
24783    pub const DEFAULT: Self = Self {
24784        rxerrors: 0_u16,
24785        fixed: 0_u16,
24786        rssi: 0_u8,
24787        remrssi: 0_u8,
24788        txbuf: 0_u8,
24789        noise: 0_u8,
24790        remnoise: 0_u8,
24791    };
24792    #[cfg(feature = "arbitrary")]
24793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24794        use arbitrary::{Arbitrary, Unstructured};
24795        let mut buf = [0u8; 1024];
24796        rng.fill_bytes(&mut buf);
24797        let mut unstructured = Unstructured::new(&buf);
24798        Self::arbitrary(&mut unstructured).unwrap_or_default()
24799    }
24800}
24801impl Default for RADIO_STATUS_DATA {
24802    fn default() -> Self {
24803        Self::DEFAULT.clone()
24804    }
24805}
24806impl MessageData for RADIO_STATUS_DATA {
24807    type Message = MavMessage;
24808    const ID: u32 = 109u32;
24809    const NAME: &'static str = "RADIO_STATUS";
24810    const EXTRA_CRC: u8 = 185u8;
24811    const ENCODED_LEN: usize = 9usize;
24812    fn deser(
24813        _version: MavlinkVersion,
24814        __input: &[u8],
24815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24816        let avail_len = __input.len();
24817        let mut payload_buf = [0; Self::ENCODED_LEN];
24818        let mut buf = if avail_len < Self::ENCODED_LEN {
24819            payload_buf[0..avail_len].copy_from_slice(__input);
24820            Bytes::new(&payload_buf)
24821        } else {
24822            Bytes::new(__input)
24823        };
24824        let mut __struct = Self::default();
24825        __struct.rxerrors = buf.get_u16_le();
24826        __struct.fixed = buf.get_u16_le();
24827        __struct.rssi = buf.get_u8();
24828        __struct.remrssi = buf.get_u8();
24829        __struct.txbuf = buf.get_u8();
24830        __struct.noise = buf.get_u8();
24831        __struct.remnoise = buf.get_u8();
24832        Ok(__struct)
24833    }
24834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24835        let mut __tmp = BytesMut::new(bytes);
24836        #[allow(clippy::absurd_extreme_comparisons)]
24837        #[allow(unused_comparisons)]
24838        if __tmp.remaining() < Self::ENCODED_LEN {
24839            panic!(
24840                "buffer is too small (need {} bytes, but got {})",
24841                Self::ENCODED_LEN,
24842                __tmp.remaining(),
24843            )
24844        }
24845        __tmp.put_u16_le(self.rxerrors);
24846        __tmp.put_u16_le(self.fixed);
24847        __tmp.put_u8(self.rssi);
24848        __tmp.put_u8(self.remrssi);
24849        __tmp.put_u8(self.txbuf);
24850        __tmp.put_u8(self.noise);
24851        __tmp.put_u8(self.remnoise);
24852        if matches!(version, MavlinkVersion::V2) {
24853            let len = __tmp.len();
24854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24855        } else {
24856            __tmp.len()
24857        }
24858    }
24859}
24860#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24861#[doc = ""]
24862#[doc = "ID: 27"]
24863#[derive(Debug, Clone, PartialEq)]
24864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24866#[cfg_attr(feature = "ts", derive(TS))]
24867#[cfg_attr(feature = "ts", ts(export))]
24868pub struct RAW_IMU_DATA {
24869    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24870    pub time_usec: u64,
24871    #[doc = "X acceleration (raw)"]
24872    pub xacc: i16,
24873    #[doc = "Y acceleration (raw)"]
24874    pub yacc: i16,
24875    #[doc = "Z acceleration (raw)"]
24876    pub zacc: i16,
24877    #[doc = "Angular speed around X axis (raw)"]
24878    pub xgyro: i16,
24879    #[doc = "Angular speed around Y axis (raw)"]
24880    pub ygyro: i16,
24881    #[doc = "Angular speed around Z axis (raw)"]
24882    pub zgyro: i16,
24883    #[doc = "X Magnetic field (raw)"]
24884    pub xmag: i16,
24885    #[doc = "Y Magnetic field (raw)"]
24886    pub ymag: i16,
24887    #[doc = "Z Magnetic field (raw)"]
24888    pub zmag: i16,
24889    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24891    pub id: u8,
24892    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24894    pub temperature: i16,
24895}
24896impl RAW_IMU_DATA {
24897    pub const ENCODED_LEN: usize = 29usize;
24898    pub const DEFAULT: Self = Self {
24899        time_usec: 0_u64,
24900        xacc: 0_i16,
24901        yacc: 0_i16,
24902        zacc: 0_i16,
24903        xgyro: 0_i16,
24904        ygyro: 0_i16,
24905        zgyro: 0_i16,
24906        xmag: 0_i16,
24907        ymag: 0_i16,
24908        zmag: 0_i16,
24909        id: 0_u8,
24910        temperature: 0_i16,
24911    };
24912    #[cfg(feature = "arbitrary")]
24913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24914        use arbitrary::{Arbitrary, Unstructured};
24915        let mut buf = [0u8; 1024];
24916        rng.fill_bytes(&mut buf);
24917        let mut unstructured = Unstructured::new(&buf);
24918        Self::arbitrary(&mut unstructured).unwrap_or_default()
24919    }
24920}
24921impl Default for RAW_IMU_DATA {
24922    fn default() -> Self {
24923        Self::DEFAULT.clone()
24924    }
24925}
24926impl MessageData for RAW_IMU_DATA {
24927    type Message = MavMessage;
24928    const ID: u32 = 27u32;
24929    const NAME: &'static str = "RAW_IMU";
24930    const EXTRA_CRC: u8 = 144u8;
24931    const ENCODED_LEN: usize = 29usize;
24932    fn deser(
24933        _version: MavlinkVersion,
24934        __input: &[u8],
24935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24936        let avail_len = __input.len();
24937        let mut payload_buf = [0; Self::ENCODED_LEN];
24938        let mut buf = if avail_len < Self::ENCODED_LEN {
24939            payload_buf[0..avail_len].copy_from_slice(__input);
24940            Bytes::new(&payload_buf)
24941        } else {
24942            Bytes::new(__input)
24943        };
24944        let mut __struct = Self::default();
24945        __struct.time_usec = buf.get_u64_le();
24946        __struct.xacc = buf.get_i16_le();
24947        __struct.yacc = buf.get_i16_le();
24948        __struct.zacc = buf.get_i16_le();
24949        __struct.xgyro = buf.get_i16_le();
24950        __struct.ygyro = buf.get_i16_le();
24951        __struct.zgyro = buf.get_i16_le();
24952        __struct.xmag = buf.get_i16_le();
24953        __struct.ymag = buf.get_i16_le();
24954        __struct.zmag = buf.get_i16_le();
24955        __struct.id = buf.get_u8();
24956        __struct.temperature = buf.get_i16_le();
24957        Ok(__struct)
24958    }
24959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24960        let mut __tmp = BytesMut::new(bytes);
24961        #[allow(clippy::absurd_extreme_comparisons)]
24962        #[allow(unused_comparisons)]
24963        if __tmp.remaining() < Self::ENCODED_LEN {
24964            panic!(
24965                "buffer is too small (need {} bytes, but got {})",
24966                Self::ENCODED_LEN,
24967                __tmp.remaining(),
24968            )
24969        }
24970        __tmp.put_u64_le(self.time_usec);
24971        __tmp.put_i16_le(self.xacc);
24972        __tmp.put_i16_le(self.yacc);
24973        __tmp.put_i16_le(self.zacc);
24974        __tmp.put_i16_le(self.xgyro);
24975        __tmp.put_i16_le(self.ygyro);
24976        __tmp.put_i16_le(self.zgyro);
24977        __tmp.put_i16_le(self.xmag);
24978        __tmp.put_i16_le(self.ymag);
24979        __tmp.put_i16_le(self.zmag);
24980        if matches!(version, MavlinkVersion::V2) {
24981            __tmp.put_u8(self.id);
24982            __tmp.put_i16_le(self.temperature);
24983            let len = __tmp.len();
24984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24985        } else {
24986            __tmp.len()
24987        }
24988    }
24989}
24990#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24991#[doc = ""]
24992#[doc = "ID: 28"]
24993#[derive(Debug, Clone, PartialEq)]
24994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24996#[cfg_attr(feature = "ts", derive(TS))]
24997#[cfg_attr(feature = "ts", ts(export))]
24998pub struct RAW_PRESSURE_DATA {
24999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25000    pub time_usec: u64,
25001    #[doc = "Absolute pressure (raw)"]
25002    pub press_abs: i16,
25003    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25004    pub press_diff1: i16,
25005    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25006    pub press_diff2: i16,
25007    #[doc = "Raw Temperature measurement (raw)"]
25008    pub temperature: i16,
25009}
25010impl RAW_PRESSURE_DATA {
25011    pub const ENCODED_LEN: usize = 16usize;
25012    pub const DEFAULT: Self = Self {
25013        time_usec: 0_u64,
25014        press_abs: 0_i16,
25015        press_diff1: 0_i16,
25016        press_diff2: 0_i16,
25017        temperature: 0_i16,
25018    };
25019    #[cfg(feature = "arbitrary")]
25020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25021        use arbitrary::{Arbitrary, Unstructured};
25022        let mut buf = [0u8; 1024];
25023        rng.fill_bytes(&mut buf);
25024        let mut unstructured = Unstructured::new(&buf);
25025        Self::arbitrary(&mut unstructured).unwrap_or_default()
25026    }
25027}
25028impl Default for RAW_PRESSURE_DATA {
25029    fn default() -> Self {
25030        Self::DEFAULT.clone()
25031    }
25032}
25033impl MessageData for RAW_PRESSURE_DATA {
25034    type Message = MavMessage;
25035    const ID: u32 = 28u32;
25036    const NAME: &'static str = "RAW_PRESSURE";
25037    const EXTRA_CRC: u8 = 67u8;
25038    const ENCODED_LEN: usize = 16usize;
25039    fn deser(
25040        _version: MavlinkVersion,
25041        __input: &[u8],
25042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25043        let avail_len = __input.len();
25044        let mut payload_buf = [0; Self::ENCODED_LEN];
25045        let mut buf = if avail_len < Self::ENCODED_LEN {
25046            payload_buf[0..avail_len].copy_from_slice(__input);
25047            Bytes::new(&payload_buf)
25048        } else {
25049            Bytes::new(__input)
25050        };
25051        let mut __struct = Self::default();
25052        __struct.time_usec = buf.get_u64_le();
25053        __struct.press_abs = buf.get_i16_le();
25054        __struct.press_diff1 = buf.get_i16_le();
25055        __struct.press_diff2 = buf.get_i16_le();
25056        __struct.temperature = buf.get_i16_le();
25057        Ok(__struct)
25058    }
25059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25060        let mut __tmp = BytesMut::new(bytes);
25061        #[allow(clippy::absurd_extreme_comparisons)]
25062        #[allow(unused_comparisons)]
25063        if __tmp.remaining() < Self::ENCODED_LEN {
25064            panic!(
25065                "buffer is too small (need {} bytes, but got {})",
25066                Self::ENCODED_LEN,
25067                __tmp.remaining(),
25068            )
25069        }
25070        __tmp.put_u64_le(self.time_usec);
25071        __tmp.put_i16_le(self.press_abs);
25072        __tmp.put_i16_le(self.press_diff1);
25073        __tmp.put_i16_le(self.press_diff2);
25074        __tmp.put_i16_le(self.temperature);
25075        if matches!(version, MavlinkVersion::V2) {
25076            let len = __tmp.len();
25077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25078        } else {
25079            __tmp.len()
25080        }
25081    }
25082}
25083#[doc = "RPM sensor data message."]
25084#[doc = ""]
25085#[doc = "ID: 339"]
25086#[derive(Debug, Clone, PartialEq)]
25087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25089#[cfg_attr(feature = "ts", derive(TS))]
25090#[cfg_attr(feature = "ts", ts(export))]
25091pub struct RAW_RPM_DATA {
25092    #[doc = "Indicated rate"]
25093    pub frequency: f32,
25094    #[doc = "Index of this RPM sensor (0-indexed)"]
25095    pub index: u8,
25096}
25097impl RAW_RPM_DATA {
25098    pub const ENCODED_LEN: usize = 5usize;
25099    pub const DEFAULT: Self = Self {
25100        frequency: 0.0_f32,
25101        index: 0_u8,
25102    };
25103    #[cfg(feature = "arbitrary")]
25104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25105        use arbitrary::{Arbitrary, Unstructured};
25106        let mut buf = [0u8; 1024];
25107        rng.fill_bytes(&mut buf);
25108        let mut unstructured = Unstructured::new(&buf);
25109        Self::arbitrary(&mut unstructured).unwrap_or_default()
25110    }
25111}
25112impl Default for RAW_RPM_DATA {
25113    fn default() -> Self {
25114        Self::DEFAULT.clone()
25115    }
25116}
25117impl MessageData for RAW_RPM_DATA {
25118    type Message = MavMessage;
25119    const ID: u32 = 339u32;
25120    const NAME: &'static str = "RAW_RPM";
25121    const EXTRA_CRC: u8 = 199u8;
25122    const ENCODED_LEN: usize = 5usize;
25123    fn deser(
25124        _version: MavlinkVersion,
25125        __input: &[u8],
25126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25127        let avail_len = __input.len();
25128        let mut payload_buf = [0; Self::ENCODED_LEN];
25129        let mut buf = if avail_len < Self::ENCODED_LEN {
25130            payload_buf[0..avail_len].copy_from_slice(__input);
25131            Bytes::new(&payload_buf)
25132        } else {
25133            Bytes::new(__input)
25134        };
25135        let mut __struct = Self::default();
25136        __struct.frequency = buf.get_f32_le();
25137        __struct.index = buf.get_u8();
25138        Ok(__struct)
25139    }
25140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25141        let mut __tmp = BytesMut::new(bytes);
25142        #[allow(clippy::absurd_extreme_comparisons)]
25143        #[allow(unused_comparisons)]
25144        if __tmp.remaining() < Self::ENCODED_LEN {
25145            panic!(
25146                "buffer is too small (need {} bytes, but got {})",
25147                Self::ENCODED_LEN,
25148                __tmp.remaining(),
25149            )
25150        }
25151        __tmp.put_f32_le(self.frequency);
25152        __tmp.put_u8(self.index);
25153        if matches!(version, MavlinkVersion::V2) {
25154            let len = __tmp.len();
25155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25156        } else {
25157            __tmp.len()
25158        }
25159    }
25160}
25161#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25162#[doc = ""]
25163#[doc = "ID: 65"]
25164#[derive(Debug, Clone, PartialEq)]
25165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25167#[cfg_attr(feature = "ts", derive(TS))]
25168#[cfg_attr(feature = "ts", ts(export))]
25169pub struct RC_CHANNELS_DATA {
25170    #[doc = "Timestamp (time since system boot)."]
25171    pub time_boot_ms: u32,
25172    #[doc = "RC channel 1 value."]
25173    pub chan1_raw: u16,
25174    #[doc = "RC channel 2 value."]
25175    pub chan2_raw: u16,
25176    #[doc = "RC channel 3 value."]
25177    pub chan3_raw: u16,
25178    #[doc = "RC channel 4 value."]
25179    pub chan4_raw: u16,
25180    #[doc = "RC channel 5 value."]
25181    pub chan5_raw: u16,
25182    #[doc = "RC channel 6 value."]
25183    pub chan6_raw: u16,
25184    #[doc = "RC channel 7 value."]
25185    pub chan7_raw: u16,
25186    #[doc = "RC channel 8 value."]
25187    pub chan8_raw: u16,
25188    #[doc = "RC channel 9 value."]
25189    pub chan9_raw: u16,
25190    #[doc = "RC channel 10 value."]
25191    pub chan10_raw: u16,
25192    #[doc = "RC channel 11 value."]
25193    pub chan11_raw: u16,
25194    #[doc = "RC channel 12 value."]
25195    pub chan12_raw: u16,
25196    #[doc = "RC channel 13 value."]
25197    pub chan13_raw: u16,
25198    #[doc = "RC channel 14 value."]
25199    pub chan14_raw: u16,
25200    #[doc = "RC channel 15 value."]
25201    pub chan15_raw: u16,
25202    #[doc = "RC channel 16 value."]
25203    pub chan16_raw: u16,
25204    #[doc = "RC channel 17 value."]
25205    pub chan17_raw: u16,
25206    #[doc = "RC channel 18 value."]
25207    pub chan18_raw: u16,
25208    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25209    pub chancount: u8,
25210    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25211    pub rssi: u8,
25212}
25213impl RC_CHANNELS_DATA {
25214    pub const ENCODED_LEN: usize = 42usize;
25215    pub const DEFAULT: Self = Self {
25216        time_boot_ms: 0_u32,
25217        chan1_raw: 0_u16,
25218        chan2_raw: 0_u16,
25219        chan3_raw: 0_u16,
25220        chan4_raw: 0_u16,
25221        chan5_raw: 0_u16,
25222        chan6_raw: 0_u16,
25223        chan7_raw: 0_u16,
25224        chan8_raw: 0_u16,
25225        chan9_raw: 0_u16,
25226        chan10_raw: 0_u16,
25227        chan11_raw: 0_u16,
25228        chan12_raw: 0_u16,
25229        chan13_raw: 0_u16,
25230        chan14_raw: 0_u16,
25231        chan15_raw: 0_u16,
25232        chan16_raw: 0_u16,
25233        chan17_raw: 0_u16,
25234        chan18_raw: 0_u16,
25235        chancount: 0_u8,
25236        rssi: 0_u8,
25237    };
25238    #[cfg(feature = "arbitrary")]
25239    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25240        use arbitrary::{Arbitrary, Unstructured};
25241        let mut buf = [0u8; 1024];
25242        rng.fill_bytes(&mut buf);
25243        let mut unstructured = Unstructured::new(&buf);
25244        Self::arbitrary(&mut unstructured).unwrap_or_default()
25245    }
25246}
25247impl Default for RC_CHANNELS_DATA {
25248    fn default() -> Self {
25249        Self::DEFAULT.clone()
25250    }
25251}
25252impl MessageData for RC_CHANNELS_DATA {
25253    type Message = MavMessage;
25254    const ID: u32 = 65u32;
25255    const NAME: &'static str = "RC_CHANNELS";
25256    const EXTRA_CRC: u8 = 118u8;
25257    const ENCODED_LEN: usize = 42usize;
25258    fn deser(
25259        _version: MavlinkVersion,
25260        __input: &[u8],
25261    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25262        let avail_len = __input.len();
25263        let mut payload_buf = [0; Self::ENCODED_LEN];
25264        let mut buf = if avail_len < Self::ENCODED_LEN {
25265            payload_buf[0..avail_len].copy_from_slice(__input);
25266            Bytes::new(&payload_buf)
25267        } else {
25268            Bytes::new(__input)
25269        };
25270        let mut __struct = Self::default();
25271        __struct.time_boot_ms = buf.get_u32_le();
25272        __struct.chan1_raw = buf.get_u16_le();
25273        __struct.chan2_raw = buf.get_u16_le();
25274        __struct.chan3_raw = buf.get_u16_le();
25275        __struct.chan4_raw = buf.get_u16_le();
25276        __struct.chan5_raw = buf.get_u16_le();
25277        __struct.chan6_raw = buf.get_u16_le();
25278        __struct.chan7_raw = buf.get_u16_le();
25279        __struct.chan8_raw = buf.get_u16_le();
25280        __struct.chan9_raw = buf.get_u16_le();
25281        __struct.chan10_raw = buf.get_u16_le();
25282        __struct.chan11_raw = buf.get_u16_le();
25283        __struct.chan12_raw = buf.get_u16_le();
25284        __struct.chan13_raw = buf.get_u16_le();
25285        __struct.chan14_raw = buf.get_u16_le();
25286        __struct.chan15_raw = buf.get_u16_le();
25287        __struct.chan16_raw = buf.get_u16_le();
25288        __struct.chan17_raw = buf.get_u16_le();
25289        __struct.chan18_raw = buf.get_u16_le();
25290        __struct.chancount = buf.get_u8();
25291        __struct.rssi = buf.get_u8();
25292        Ok(__struct)
25293    }
25294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25295        let mut __tmp = BytesMut::new(bytes);
25296        #[allow(clippy::absurd_extreme_comparisons)]
25297        #[allow(unused_comparisons)]
25298        if __tmp.remaining() < Self::ENCODED_LEN {
25299            panic!(
25300                "buffer is too small (need {} bytes, but got {})",
25301                Self::ENCODED_LEN,
25302                __tmp.remaining(),
25303            )
25304        }
25305        __tmp.put_u32_le(self.time_boot_ms);
25306        __tmp.put_u16_le(self.chan1_raw);
25307        __tmp.put_u16_le(self.chan2_raw);
25308        __tmp.put_u16_le(self.chan3_raw);
25309        __tmp.put_u16_le(self.chan4_raw);
25310        __tmp.put_u16_le(self.chan5_raw);
25311        __tmp.put_u16_le(self.chan6_raw);
25312        __tmp.put_u16_le(self.chan7_raw);
25313        __tmp.put_u16_le(self.chan8_raw);
25314        __tmp.put_u16_le(self.chan9_raw);
25315        __tmp.put_u16_le(self.chan10_raw);
25316        __tmp.put_u16_le(self.chan11_raw);
25317        __tmp.put_u16_le(self.chan12_raw);
25318        __tmp.put_u16_le(self.chan13_raw);
25319        __tmp.put_u16_le(self.chan14_raw);
25320        __tmp.put_u16_le(self.chan15_raw);
25321        __tmp.put_u16_le(self.chan16_raw);
25322        __tmp.put_u16_le(self.chan17_raw);
25323        __tmp.put_u16_le(self.chan18_raw);
25324        __tmp.put_u8(self.chancount);
25325        __tmp.put_u8(self.rssi);
25326        if matches!(version, MavlinkVersion::V2) {
25327            let len = __tmp.len();
25328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25329        } else {
25330            __tmp.len()
25331        }
25332    }
25333}
25334#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25335#[doc = ""]
25336#[doc = "ID: 70"]
25337#[derive(Debug, Clone, PartialEq)]
25338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25340#[cfg_attr(feature = "ts", derive(TS))]
25341#[cfg_attr(feature = "ts", ts(export))]
25342pub struct RC_CHANNELS_OVERRIDE_DATA {
25343    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25344    pub chan1_raw: u16,
25345    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25346    pub chan2_raw: u16,
25347    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25348    pub chan3_raw: u16,
25349    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25350    pub chan4_raw: u16,
25351    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25352    pub chan5_raw: u16,
25353    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25354    pub chan6_raw: u16,
25355    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25356    pub chan7_raw: u16,
25357    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25358    pub chan8_raw: u16,
25359    #[doc = "System ID"]
25360    pub target_system: u8,
25361    #[doc = "Component ID"]
25362    pub target_component: u8,
25363    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25365    pub chan9_raw: u16,
25366    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25368    pub chan10_raw: u16,
25369    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25371    pub chan11_raw: u16,
25372    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25374    pub chan12_raw: u16,
25375    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25376    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25377    pub chan13_raw: u16,
25378    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25379    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25380    pub chan14_raw: u16,
25381    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25382    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25383    pub chan15_raw: u16,
25384    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25386    pub chan16_raw: u16,
25387    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25389    pub chan17_raw: u16,
25390    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25392    pub chan18_raw: u16,
25393}
25394impl RC_CHANNELS_OVERRIDE_DATA {
25395    pub const ENCODED_LEN: usize = 38usize;
25396    pub const DEFAULT: Self = Self {
25397        chan1_raw: 0_u16,
25398        chan2_raw: 0_u16,
25399        chan3_raw: 0_u16,
25400        chan4_raw: 0_u16,
25401        chan5_raw: 0_u16,
25402        chan6_raw: 0_u16,
25403        chan7_raw: 0_u16,
25404        chan8_raw: 0_u16,
25405        target_system: 0_u8,
25406        target_component: 0_u8,
25407        chan9_raw: 0_u16,
25408        chan10_raw: 0_u16,
25409        chan11_raw: 0_u16,
25410        chan12_raw: 0_u16,
25411        chan13_raw: 0_u16,
25412        chan14_raw: 0_u16,
25413        chan15_raw: 0_u16,
25414        chan16_raw: 0_u16,
25415        chan17_raw: 0_u16,
25416        chan18_raw: 0_u16,
25417    };
25418    #[cfg(feature = "arbitrary")]
25419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25420        use arbitrary::{Arbitrary, Unstructured};
25421        let mut buf = [0u8; 1024];
25422        rng.fill_bytes(&mut buf);
25423        let mut unstructured = Unstructured::new(&buf);
25424        Self::arbitrary(&mut unstructured).unwrap_or_default()
25425    }
25426}
25427impl Default for RC_CHANNELS_OVERRIDE_DATA {
25428    fn default() -> Self {
25429        Self::DEFAULT.clone()
25430    }
25431}
25432impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25433    type Message = MavMessage;
25434    const ID: u32 = 70u32;
25435    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25436    const EXTRA_CRC: u8 = 124u8;
25437    const ENCODED_LEN: usize = 38usize;
25438    fn deser(
25439        _version: MavlinkVersion,
25440        __input: &[u8],
25441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25442        let avail_len = __input.len();
25443        let mut payload_buf = [0; Self::ENCODED_LEN];
25444        let mut buf = if avail_len < Self::ENCODED_LEN {
25445            payload_buf[0..avail_len].copy_from_slice(__input);
25446            Bytes::new(&payload_buf)
25447        } else {
25448            Bytes::new(__input)
25449        };
25450        let mut __struct = Self::default();
25451        __struct.chan1_raw = buf.get_u16_le();
25452        __struct.chan2_raw = buf.get_u16_le();
25453        __struct.chan3_raw = buf.get_u16_le();
25454        __struct.chan4_raw = buf.get_u16_le();
25455        __struct.chan5_raw = buf.get_u16_le();
25456        __struct.chan6_raw = buf.get_u16_le();
25457        __struct.chan7_raw = buf.get_u16_le();
25458        __struct.chan8_raw = buf.get_u16_le();
25459        __struct.target_system = buf.get_u8();
25460        __struct.target_component = buf.get_u8();
25461        __struct.chan9_raw = buf.get_u16_le();
25462        __struct.chan10_raw = buf.get_u16_le();
25463        __struct.chan11_raw = buf.get_u16_le();
25464        __struct.chan12_raw = buf.get_u16_le();
25465        __struct.chan13_raw = buf.get_u16_le();
25466        __struct.chan14_raw = buf.get_u16_le();
25467        __struct.chan15_raw = buf.get_u16_le();
25468        __struct.chan16_raw = buf.get_u16_le();
25469        __struct.chan17_raw = buf.get_u16_le();
25470        __struct.chan18_raw = buf.get_u16_le();
25471        Ok(__struct)
25472    }
25473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25474        let mut __tmp = BytesMut::new(bytes);
25475        #[allow(clippy::absurd_extreme_comparisons)]
25476        #[allow(unused_comparisons)]
25477        if __tmp.remaining() < Self::ENCODED_LEN {
25478            panic!(
25479                "buffer is too small (need {} bytes, but got {})",
25480                Self::ENCODED_LEN,
25481                __tmp.remaining(),
25482            )
25483        }
25484        __tmp.put_u16_le(self.chan1_raw);
25485        __tmp.put_u16_le(self.chan2_raw);
25486        __tmp.put_u16_le(self.chan3_raw);
25487        __tmp.put_u16_le(self.chan4_raw);
25488        __tmp.put_u16_le(self.chan5_raw);
25489        __tmp.put_u16_le(self.chan6_raw);
25490        __tmp.put_u16_le(self.chan7_raw);
25491        __tmp.put_u16_le(self.chan8_raw);
25492        __tmp.put_u8(self.target_system);
25493        __tmp.put_u8(self.target_component);
25494        if matches!(version, MavlinkVersion::V2) {
25495            __tmp.put_u16_le(self.chan9_raw);
25496            __tmp.put_u16_le(self.chan10_raw);
25497            __tmp.put_u16_le(self.chan11_raw);
25498            __tmp.put_u16_le(self.chan12_raw);
25499            __tmp.put_u16_le(self.chan13_raw);
25500            __tmp.put_u16_le(self.chan14_raw);
25501            __tmp.put_u16_le(self.chan15_raw);
25502            __tmp.put_u16_le(self.chan16_raw);
25503            __tmp.put_u16_le(self.chan17_raw);
25504            __tmp.put_u16_le(self.chan18_raw);
25505            let len = __tmp.len();
25506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25507        } else {
25508            __tmp.len()
25509        }
25510    }
25511}
25512#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25513#[doc = ""]
25514#[doc = "ID: 35"]
25515#[derive(Debug, Clone, PartialEq)]
25516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25518#[cfg_attr(feature = "ts", derive(TS))]
25519#[cfg_attr(feature = "ts", ts(export))]
25520pub struct RC_CHANNELS_RAW_DATA {
25521    #[doc = "Timestamp (time since system boot)."]
25522    pub time_boot_ms: u32,
25523    #[doc = "RC channel 1 value."]
25524    pub chan1_raw: u16,
25525    #[doc = "RC channel 2 value."]
25526    pub chan2_raw: u16,
25527    #[doc = "RC channel 3 value."]
25528    pub chan3_raw: u16,
25529    #[doc = "RC channel 4 value."]
25530    pub chan4_raw: u16,
25531    #[doc = "RC channel 5 value."]
25532    pub chan5_raw: u16,
25533    #[doc = "RC channel 6 value."]
25534    pub chan6_raw: u16,
25535    #[doc = "RC channel 7 value."]
25536    pub chan7_raw: u16,
25537    #[doc = "RC channel 8 value."]
25538    pub chan8_raw: u16,
25539    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25540    pub port: u8,
25541    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25542    pub rssi: u8,
25543}
25544impl RC_CHANNELS_RAW_DATA {
25545    pub const ENCODED_LEN: usize = 22usize;
25546    pub const DEFAULT: Self = Self {
25547        time_boot_ms: 0_u32,
25548        chan1_raw: 0_u16,
25549        chan2_raw: 0_u16,
25550        chan3_raw: 0_u16,
25551        chan4_raw: 0_u16,
25552        chan5_raw: 0_u16,
25553        chan6_raw: 0_u16,
25554        chan7_raw: 0_u16,
25555        chan8_raw: 0_u16,
25556        port: 0_u8,
25557        rssi: 0_u8,
25558    };
25559    #[cfg(feature = "arbitrary")]
25560    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25561        use arbitrary::{Arbitrary, Unstructured};
25562        let mut buf = [0u8; 1024];
25563        rng.fill_bytes(&mut buf);
25564        let mut unstructured = Unstructured::new(&buf);
25565        Self::arbitrary(&mut unstructured).unwrap_or_default()
25566    }
25567}
25568impl Default for RC_CHANNELS_RAW_DATA {
25569    fn default() -> Self {
25570        Self::DEFAULT.clone()
25571    }
25572}
25573impl MessageData for RC_CHANNELS_RAW_DATA {
25574    type Message = MavMessage;
25575    const ID: u32 = 35u32;
25576    const NAME: &'static str = "RC_CHANNELS_RAW";
25577    const EXTRA_CRC: u8 = 244u8;
25578    const ENCODED_LEN: usize = 22usize;
25579    fn deser(
25580        _version: MavlinkVersion,
25581        __input: &[u8],
25582    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25583        let avail_len = __input.len();
25584        let mut payload_buf = [0; Self::ENCODED_LEN];
25585        let mut buf = if avail_len < Self::ENCODED_LEN {
25586            payload_buf[0..avail_len].copy_from_slice(__input);
25587            Bytes::new(&payload_buf)
25588        } else {
25589            Bytes::new(__input)
25590        };
25591        let mut __struct = Self::default();
25592        __struct.time_boot_ms = buf.get_u32_le();
25593        __struct.chan1_raw = buf.get_u16_le();
25594        __struct.chan2_raw = buf.get_u16_le();
25595        __struct.chan3_raw = buf.get_u16_le();
25596        __struct.chan4_raw = buf.get_u16_le();
25597        __struct.chan5_raw = buf.get_u16_le();
25598        __struct.chan6_raw = buf.get_u16_le();
25599        __struct.chan7_raw = buf.get_u16_le();
25600        __struct.chan8_raw = buf.get_u16_le();
25601        __struct.port = buf.get_u8();
25602        __struct.rssi = buf.get_u8();
25603        Ok(__struct)
25604    }
25605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25606        let mut __tmp = BytesMut::new(bytes);
25607        #[allow(clippy::absurd_extreme_comparisons)]
25608        #[allow(unused_comparisons)]
25609        if __tmp.remaining() < Self::ENCODED_LEN {
25610            panic!(
25611                "buffer is too small (need {} bytes, but got {})",
25612                Self::ENCODED_LEN,
25613                __tmp.remaining(),
25614            )
25615        }
25616        __tmp.put_u32_le(self.time_boot_ms);
25617        __tmp.put_u16_le(self.chan1_raw);
25618        __tmp.put_u16_le(self.chan2_raw);
25619        __tmp.put_u16_le(self.chan3_raw);
25620        __tmp.put_u16_le(self.chan4_raw);
25621        __tmp.put_u16_le(self.chan5_raw);
25622        __tmp.put_u16_le(self.chan6_raw);
25623        __tmp.put_u16_le(self.chan7_raw);
25624        __tmp.put_u16_le(self.chan8_raw);
25625        __tmp.put_u8(self.port);
25626        __tmp.put_u8(self.rssi);
25627        if matches!(version, MavlinkVersion::V2) {
25628            let len = __tmp.len();
25629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25630        } else {
25631            __tmp.len()
25632        }
25633    }
25634}
25635#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25636#[doc = ""]
25637#[doc = "ID: 34"]
25638#[derive(Debug, Clone, PartialEq)]
25639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25641#[cfg_attr(feature = "ts", derive(TS))]
25642#[cfg_attr(feature = "ts", ts(export))]
25643pub struct RC_CHANNELS_SCALED_DATA {
25644    #[doc = "Timestamp (time since system boot)."]
25645    pub time_boot_ms: u32,
25646    #[doc = "RC channel 1 value scaled."]
25647    pub chan1_scaled: i16,
25648    #[doc = "RC channel 2 value scaled."]
25649    pub chan2_scaled: i16,
25650    #[doc = "RC channel 3 value scaled."]
25651    pub chan3_scaled: i16,
25652    #[doc = "RC channel 4 value scaled."]
25653    pub chan4_scaled: i16,
25654    #[doc = "RC channel 5 value scaled."]
25655    pub chan5_scaled: i16,
25656    #[doc = "RC channel 6 value scaled."]
25657    pub chan6_scaled: i16,
25658    #[doc = "RC channel 7 value scaled."]
25659    pub chan7_scaled: i16,
25660    #[doc = "RC channel 8 value scaled."]
25661    pub chan8_scaled: i16,
25662    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25663    pub port: u8,
25664    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25665    pub rssi: u8,
25666}
25667impl RC_CHANNELS_SCALED_DATA {
25668    pub const ENCODED_LEN: usize = 22usize;
25669    pub const DEFAULT: Self = Self {
25670        time_boot_ms: 0_u32,
25671        chan1_scaled: 0_i16,
25672        chan2_scaled: 0_i16,
25673        chan3_scaled: 0_i16,
25674        chan4_scaled: 0_i16,
25675        chan5_scaled: 0_i16,
25676        chan6_scaled: 0_i16,
25677        chan7_scaled: 0_i16,
25678        chan8_scaled: 0_i16,
25679        port: 0_u8,
25680        rssi: 0_u8,
25681    };
25682    #[cfg(feature = "arbitrary")]
25683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25684        use arbitrary::{Arbitrary, Unstructured};
25685        let mut buf = [0u8; 1024];
25686        rng.fill_bytes(&mut buf);
25687        let mut unstructured = Unstructured::new(&buf);
25688        Self::arbitrary(&mut unstructured).unwrap_or_default()
25689    }
25690}
25691impl Default for RC_CHANNELS_SCALED_DATA {
25692    fn default() -> Self {
25693        Self::DEFAULT.clone()
25694    }
25695}
25696impl MessageData for RC_CHANNELS_SCALED_DATA {
25697    type Message = MavMessage;
25698    const ID: u32 = 34u32;
25699    const NAME: &'static str = "RC_CHANNELS_SCALED";
25700    const EXTRA_CRC: u8 = 237u8;
25701    const ENCODED_LEN: usize = 22usize;
25702    fn deser(
25703        _version: MavlinkVersion,
25704        __input: &[u8],
25705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25706        let avail_len = __input.len();
25707        let mut payload_buf = [0; Self::ENCODED_LEN];
25708        let mut buf = if avail_len < Self::ENCODED_LEN {
25709            payload_buf[0..avail_len].copy_from_slice(__input);
25710            Bytes::new(&payload_buf)
25711        } else {
25712            Bytes::new(__input)
25713        };
25714        let mut __struct = Self::default();
25715        __struct.time_boot_ms = buf.get_u32_le();
25716        __struct.chan1_scaled = buf.get_i16_le();
25717        __struct.chan2_scaled = buf.get_i16_le();
25718        __struct.chan3_scaled = buf.get_i16_le();
25719        __struct.chan4_scaled = buf.get_i16_le();
25720        __struct.chan5_scaled = buf.get_i16_le();
25721        __struct.chan6_scaled = buf.get_i16_le();
25722        __struct.chan7_scaled = buf.get_i16_le();
25723        __struct.chan8_scaled = buf.get_i16_le();
25724        __struct.port = buf.get_u8();
25725        __struct.rssi = buf.get_u8();
25726        Ok(__struct)
25727    }
25728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25729        let mut __tmp = BytesMut::new(bytes);
25730        #[allow(clippy::absurd_extreme_comparisons)]
25731        #[allow(unused_comparisons)]
25732        if __tmp.remaining() < Self::ENCODED_LEN {
25733            panic!(
25734                "buffer is too small (need {} bytes, but got {})",
25735                Self::ENCODED_LEN,
25736                __tmp.remaining(),
25737            )
25738        }
25739        __tmp.put_u32_le(self.time_boot_ms);
25740        __tmp.put_i16_le(self.chan1_scaled);
25741        __tmp.put_i16_le(self.chan2_scaled);
25742        __tmp.put_i16_le(self.chan3_scaled);
25743        __tmp.put_i16_le(self.chan4_scaled);
25744        __tmp.put_i16_le(self.chan5_scaled);
25745        __tmp.put_i16_le(self.chan6_scaled);
25746        __tmp.put_i16_le(self.chan7_scaled);
25747        __tmp.put_i16_le(self.chan8_scaled);
25748        __tmp.put_u8(self.port);
25749        __tmp.put_u8(self.rssi);
25750        if matches!(version, MavlinkVersion::V2) {
25751            let len = __tmp.len();
25752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25753        } else {
25754            __tmp.len()
25755        }
25756    }
25757}
25758#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25759#[doc = "Request a data stream."]
25760#[doc = ""]
25761#[doc = "ID: 66"]
25762#[derive(Debug, Clone, PartialEq)]
25763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25765#[cfg_attr(feature = "ts", derive(TS))]
25766#[cfg_attr(feature = "ts", ts(export))]
25767pub struct REQUEST_DATA_STREAM_DATA {
25768    #[doc = "The requested message rate"]
25769    pub req_message_rate: u16,
25770    #[doc = "The target requested to send the message stream."]
25771    pub target_system: u8,
25772    #[doc = "The target requested to send the message stream."]
25773    pub target_component: u8,
25774    #[doc = "The ID of the requested data stream"]
25775    pub req_stream_id: u8,
25776    #[doc = "1 to start sending, 0 to stop sending."]
25777    pub start_stop: u8,
25778}
25779impl REQUEST_DATA_STREAM_DATA {
25780    pub const ENCODED_LEN: usize = 6usize;
25781    pub const DEFAULT: Self = Self {
25782        req_message_rate: 0_u16,
25783        target_system: 0_u8,
25784        target_component: 0_u8,
25785        req_stream_id: 0_u8,
25786        start_stop: 0_u8,
25787    };
25788    #[cfg(feature = "arbitrary")]
25789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25790        use arbitrary::{Arbitrary, Unstructured};
25791        let mut buf = [0u8; 1024];
25792        rng.fill_bytes(&mut buf);
25793        let mut unstructured = Unstructured::new(&buf);
25794        Self::arbitrary(&mut unstructured).unwrap_or_default()
25795    }
25796}
25797impl Default for REQUEST_DATA_STREAM_DATA {
25798    fn default() -> Self {
25799        Self::DEFAULT.clone()
25800    }
25801}
25802impl MessageData for REQUEST_DATA_STREAM_DATA {
25803    type Message = MavMessage;
25804    const ID: u32 = 66u32;
25805    const NAME: &'static str = "REQUEST_DATA_STREAM";
25806    const EXTRA_CRC: u8 = 148u8;
25807    const ENCODED_LEN: usize = 6usize;
25808    fn deser(
25809        _version: MavlinkVersion,
25810        __input: &[u8],
25811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25812        let avail_len = __input.len();
25813        let mut payload_buf = [0; Self::ENCODED_LEN];
25814        let mut buf = if avail_len < Self::ENCODED_LEN {
25815            payload_buf[0..avail_len].copy_from_slice(__input);
25816            Bytes::new(&payload_buf)
25817        } else {
25818            Bytes::new(__input)
25819        };
25820        let mut __struct = Self::default();
25821        __struct.req_message_rate = buf.get_u16_le();
25822        __struct.target_system = buf.get_u8();
25823        __struct.target_component = buf.get_u8();
25824        __struct.req_stream_id = buf.get_u8();
25825        __struct.start_stop = buf.get_u8();
25826        Ok(__struct)
25827    }
25828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25829        let mut __tmp = BytesMut::new(bytes);
25830        #[allow(clippy::absurd_extreme_comparisons)]
25831        #[allow(unused_comparisons)]
25832        if __tmp.remaining() < Self::ENCODED_LEN {
25833            panic!(
25834                "buffer is too small (need {} bytes, but got {})",
25835                Self::ENCODED_LEN,
25836                __tmp.remaining(),
25837            )
25838        }
25839        __tmp.put_u16_le(self.req_message_rate);
25840        __tmp.put_u8(self.target_system);
25841        __tmp.put_u8(self.target_component);
25842        __tmp.put_u8(self.req_stream_id);
25843        __tmp.put_u8(self.start_stop);
25844        if matches!(version, MavlinkVersion::V2) {
25845            let len = __tmp.len();
25846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25847        } else {
25848            __tmp.len()
25849        }
25850    }
25851}
25852#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25853#[doc = ""]
25854#[doc = "ID: 412"]
25855#[derive(Debug, Clone, PartialEq)]
25856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25858#[cfg_attr(feature = "ts", derive(TS))]
25859#[cfg_attr(feature = "ts", ts(export))]
25860pub struct REQUEST_EVENT_DATA {
25861    #[doc = "First sequence number of the requested event."]
25862    pub first_sequence: u16,
25863    #[doc = "Last sequence number of the requested event."]
25864    pub last_sequence: u16,
25865    #[doc = "System ID"]
25866    pub target_system: u8,
25867    #[doc = "Component ID"]
25868    pub target_component: u8,
25869}
25870impl REQUEST_EVENT_DATA {
25871    pub const ENCODED_LEN: usize = 6usize;
25872    pub const DEFAULT: Self = Self {
25873        first_sequence: 0_u16,
25874        last_sequence: 0_u16,
25875        target_system: 0_u8,
25876        target_component: 0_u8,
25877    };
25878    #[cfg(feature = "arbitrary")]
25879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25880        use arbitrary::{Arbitrary, Unstructured};
25881        let mut buf = [0u8; 1024];
25882        rng.fill_bytes(&mut buf);
25883        let mut unstructured = Unstructured::new(&buf);
25884        Self::arbitrary(&mut unstructured).unwrap_or_default()
25885    }
25886}
25887impl Default for REQUEST_EVENT_DATA {
25888    fn default() -> Self {
25889        Self::DEFAULT.clone()
25890    }
25891}
25892impl MessageData for REQUEST_EVENT_DATA {
25893    type Message = MavMessage;
25894    const ID: u32 = 412u32;
25895    const NAME: &'static str = "REQUEST_EVENT";
25896    const EXTRA_CRC: u8 = 33u8;
25897    const ENCODED_LEN: usize = 6usize;
25898    fn deser(
25899        _version: MavlinkVersion,
25900        __input: &[u8],
25901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25902        let avail_len = __input.len();
25903        let mut payload_buf = [0; Self::ENCODED_LEN];
25904        let mut buf = if avail_len < Self::ENCODED_LEN {
25905            payload_buf[0..avail_len].copy_from_slice(__input);
25906            Bytes::new(&payload_buf)
25907        } else {
25908            Bytes::new(__input)
25909        };
25910        let mut __struct = Self::default();
25911        __struct.first_sequence = buf.get_u16_le();
25912        __struct.last_sequence = buf.get_u16_le();
25913        __struct.target_system = buf.get_u8();
25914        __struct.target_component = buf.get_u8();
25915        Ok(__struct)
25916    }
25917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25918        let mut __tmp = BytesMut::new(bytes);
25919        #[allow(clippy::absurd_extreme_comparisons)]
25920        #[allow(unused_comparisons)]
25921        if __tmp.remaining() < Self::ENCODED_LEN {
25922            panic!(
25923                "buffer is too small (need {} bytes, but got {})",
25924                Self::ENCODED_LEN,
25925                __tmp.remaining(),
25926            )
25927        }
25928        __tmp.put_u16_le(self.first_sequence);
25929        __tmp.put_u16_le(self.last_sequence);
25930        __tmp.put_u8(self.target_system);
25931        __tmp.put_u8(self.target_component);
25932        if matches!(version, MavlinkVersion::V2) {
25933            let len = __tmp.len();
25934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25935        } else {
25936            __tmp.len()
25937        }
25938    }
25939}
25940#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25941#[doc = ""]
25942#[doc = "ID: 142"]
25943#[derive(Debug, Clone, PartialEq)]
25944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25946#[cfg_attr(feature = "ts", derive(TS))]
25947#[cfg_attr(feature = "ts", ts(export))]
25948pub struct RESOURCE_REQUEST_DATA {
25949    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25950    pub request_id: u8,
25951    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25952    pub uri_type: u8,
25953    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25956    pub uri: [u8; 120],
25957    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25958    pub transfer_type: u8,
25959    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25961    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25962    pub storage: [u8; 120],
25963}
25964impl RESOURCE_REQUEST_DATA {
25965    pub const ENCODED_LEN: usize = 243usize;
25966    pub const DEFAULT: Self = Self {
25967        request_id: 0_u8,
25968        uri_type: 0_u8,
25969        uri: [0_u8; 120usize],
25970        transfer_type: 0_u8,
25971        storage: [0_u8; 120usize],
25972    };
25973    #[cfg(feature = "arbitrary")]
25974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25975        use arbitrary::{Arbitrary, Unstructured};
25976        let mut buf = [0u8; 1024];
25977        rng.fill_bytes(&mut buf);
25978        let mut unstructured = Unstructured::new(&buf);
25979        Self::arbitrary(&mut unstructured).unwrap_or_default()
25980    }
25981}
25982impl Default for RESOURCE_REQUEST_DATA {
25983    fn default() -> Self {
25984        Self::DEFAULT.clone()
25985    }
25986}
25987impl MessageData for RESOURCE_REQUEST_DATA {
25988    type Message = MavMessage;
25989    const ID: u32 = 142u32;
25990    const NAME: &'static str = "RESOURCE_REQUEST";
25991    const EXTRA_CRC: u8 = 72u8;
25992    const ENCODED_LEN: usize = 243usize;
25993    fn deser(
25994        _version: MavlinkVersion,
25995        __input: &[u8],
25996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25997        let avail_len = __input.len();
25998        let mut payload_buf = [0; Self::ENCODED_LEN];
25999        let mut buf = if avail_len < Self::ENCODED_LEN {
26000            payload_buf[0..avail_len].copy_from_slice(__input);
26001            Bytes::new(&payload_buf)
26002        } else {
26003            Bytes::new(__input)
26004        };
26005        let mut __struct = Self::default();
26006        __struct.request_id = buf.get_u8();
26007        __struct.uri_type = buf.get_u8();
26008        for v in &mut __struct.uri {
26009            let val = buf.get_u8();
26010            *v = val;
26011        }
26012        __struct.transfer_type = buf.get_u8();
26013        for v in &mut __struct.storage {
26014            let val = buf.get_u8();
26015            *v = val;
26016        }
26017        Ok(__struct)
26018    }
26019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26020        let mut __tmp = BytesMut::new(bytes);
26021        #[allow(clippy::absurd_extreme_comparisons)]
26022        #[allow(unused_comparisons)]
26023        if __tmp.remaining() < Self::ENCODED_LEN {
26024            panic!(
26025                "buffer is too small (need {} bytes, but got {})",
26026                Self::ENCODED_LEN,
26027                __tmp.remaining(),
26028            )
26029        }
26030        __tmp.put_u8(self.request_id);
26031        __tmp.put_u8(self.uri_type);
26032        for val in &self.uri {
26033            __tmp.put_u8(*val);
26034        }
26035        __tmp.put_u8(self.transfer_type);
26036        for val in &self.storage {
26037            __tmp.put_u8(*val);
26038        }
26039        if matches!(version, MavlinkVersion::V2) {
26040            let len = __tmp.len();
26041            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26042        } else {
26043            __tmp.len()
26044        }
26045    }
26046}
26047#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26048#[doc = ""]
26049#[doc = "ID: 413"]
26050#[derive(Debug, Clone, PartialEq)]
26051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26053#[cfg_attr(feature = "ts", derive(TS))]
26054#[cfg_attr(feature = "ts", ts(export))]
26055pub struct RESPONSE_EVENT_ERROR_DATA {
26056    #[doc = "Sequence number."]
26057    pub sequence: u16,
26058    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26059    pub sequence_oldest_available: u16,
26060    #[doc = "System ID"]
26061    pub target_system: u8,
26062    #[doc = "Component ID"]
26063    pub target_component: u8,
26064    #[doc = "Error reason."]
26065    pub reason: MavEventErrorReason,
26066}
26067impl RESPONSE_EVENT_ERROR_DATA {
26068    pub const ENCODED_LEN: usize = 7usize;
26069    pub const DEFAULT: Self = Self {
26070        sequence: 0_u16,
26071        sequence_oldest_available: 0_u16,
26072        target_system: 0_u8,
26073        target_component: 0_u8,
26074        reason: MavEventErrorReason::DEFAULT,
26075    };
26076    #[cfg(feature = "arbitrary")]
26077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26078        use arbitrary::{Arbitrary, Unstructured};
26079        let mut buf = [0u8; 1024];
26080        rng.fill_bytes(&mut buf);
26081        let mut unstructured = Unstructured::new(&buf);
26082        Self::arbitrary(&mut unstructured).unwrap_or_default()
26083    }
26084}
26085impl Default for RESPONSE_EVENT_ERROR_DATA {
26086    fn default() -> Self {
26087        Self::DEFAULT.clone()
26088    }
26089}
26090impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26091    type Message = MavMessage;
26092    const ID: u32 = 413u32;
26093    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26094    const EXTRA_CRC: u8 = 77u8;
26095    const ENCODED_LEN: usize = 7usize;
26096    fn deser(
26097        _version: MavlinkVersion,
26098        __input: &[u8],
26099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26100        let avail_len = __input.len();
26101        let mut payload_buf = [0; Self::ENCODED_LEN];
26102        let mut buf = if avail_len < Self::ENCODED_LEN {
26103            payload_buf[0..avail_len].copy_from_slice(__input);
26104            Bytes::new(&payload_buf)
26105        } else {
26106            Bytes::new(__input)
26107        };
26108        let mut __struct = Self::default();
26109        __struct.sequence = buf.get_u16_le();
26110        __struct.sequence_oldest_available = buf.get_u16_le();
26111        __struct.target_system = buf.get_u8();
26112        __struct.target_component = buf.get_u8();
26113        let tmp = buf.get_u8();
26114        __struct.reason =
26115            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26116                enum_type: "MavEventErrorReason",
26117                value: tmp as u32,
26118            })?;
26119        Ok(__struct)
26120    }
26121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26122        let mut __tmp = BytesMut::new(bytes);
26123        #[allow(clippy::absurd_extreme_comparisons)]
26124        #[allow(unused_comparisons)]
26125        if __tmp.remaining() < Self::ENCODED_LEN {
26126            panic!(
26127                "buffer is too small (need {} bytes, but got {})",
26128                Self::ENCODED_LEN,
26129                __tmp.remaining(),
26130            )
26131        }
26132        __tmp.put_u16_le(self.sequence);
26133        __tmp.put_u16_le(self.sequence_oldest_available);
26134        __tmp.put_u8(self.target_system);
26135        __tmp.put_u8(self.target_component);
26136        __tmp.put_u8(self.reason as u8);
26137        if matches!(version, MavlinkVersion::V2) {
26138            let len = __tmp.len();
26139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26140        } else {
26141            __tmp.len()
26142        }
26143    }
26144}
26145#[doc = "Read out the safety zone the MAV currently assumes."]
26146#[doc = ""]
26147#[doc = "ID: 55"]
26148#[derive(Debug, Clone, PartialEq)]
26149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26151#[cfg_attr(feature = "ts", derive(TS))]
26152#[cfg_attr(feature = "ts", ts(export))]
26153pub struct SAFETY_ALLOWED_AREA_DATA {
26154    #[doc = "x position 1 / Latitude 1"]
26155    pub p1x: f32,
26156    #[doc = "y position 1 / Longitude 1"]
26157    pub p1y: f32,
26158    #[doc = "z position 1 / Altitude 1"]
26159    pub p1z: f32,
26160    #[doc = "x position 2 / Latitude 2"]
26161    pub p2x: f32,
26162    #[doc = "y position 2 / Longitude 2"]
26163    pub p2y: f32,
26164    #[doc = "z position 2 / Altitude 2"]
26165    pub p2z: f32,
26166    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26167    pub frame: MavFrame,
26168}
26169impl SAFETY_ALLOWED_AREA_DATA {
26170    pub const ENCODED_LEN: usize = 25usize;
26171    pub const DEFAULT: Self = Self {
26172        p1x: 0.0_f32,
26173        p1y: 0.0_f32,
26174        p1z: 0.0_f32,
26175        p2x: 0.0_f32,
26176        p2y: 0.0_f32,
26177        p2z: 0.0_f32,
26178        frame: MavFrame::DEFAULT,
26179    };
26180    #[cfg(feature = "arbitrary")]
26181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26182        use arbitrary::{Arbitrary, Unstructured};
26183        let mut buf = [0u8; 1024];
26184        rng.fill_bytes(&mut buf);
26185        let mut unstructured = Unstructured::new(&buf);
26186        Self::arbitrary(&mut unstructured).unwrap_or_default()
26187    }
26188}
26189impl Default for SAFETY_ALLOWED_AREA_DATA {
26190    fn default() -> Self {
26191        Self::DEFAULT.clone()
26192    }
26193}
26194impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26195    type Message = MavMessage;
26196    const ID: u32 = 55u32;
26197    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26198    const EXTRA_CRC: u8 = 3u8;
26199    const ENCODED_LEN: usize = 25usize;
26200    fn deser(
26201        _version: MavlinkVersion,
26202        __input: &[u8],
26203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26204        let avail_len = __input.len();
26205        let mut payload_buf = [0; Self::ENCODED_LEN];
26206        let mut buf = if avail_len < Self::ENCODED_LEN {
26207            payload_buf[0..avail_len].copy_from_slice(__input);
26208            Bytes::new(&payload_buf)
26209        } else {
26210            Bytes::new(__input)
26211        };
26212        let mut __struct = Self::default();
26213        __struct.p1x = buf.get_f32_le();
26214        __struct.p1y = buf.get_f32_le();
26215        __struct.p1z = buf.get_f32_le();
26216        __struct.p2x = buf.get_f32_le();
26217        __struct.p2y = buf.get_f32_le();
26218        __struct.p2z = buf.get_f32_le();
26219        let tmp = buf.get_u8();
26220        __struct.frame =
26221            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26222                enum_type: "MavFrame",
26223                value: tmp as u32,
26224            })?;
26225        Ok(__struct)
26226    }
26227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26228        let mut __tmp = BytesMut::new(bytes);
26229        #[allow(clippy::absurd_extreme_comparisons)]
26230        #[allow(unused_comparisons)]
26231        if __tmp.remaining() < Self::ENCODED_LEN {
26232            panic!(
26233                "buffer is too small (need {} bytes, but got {})",
26234                Self::ENCODED_LEN,
26235                __tmp.remaining(),
26236            )
26237        }
26238        __tmp.put_f32_le(self.p1x);
26239        __tmp.put_f32_le(self.p1y);
26240        __tmp.put_f32_le(self.p1z);
26241        __tmp.put_f32_le(self.p2x);
26242        __tmp.put_f32_le(self.p2y);
26243        __tmp.put_f32_le(self.p2z);
26244        __tmp.put_u8(self.frame as u8);
26245        if matches!(version, MavlinkVersion::V2) {
26246            let len = __tmp.len();
26247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26248        } else {
26249            __tmp.len()
26250        }
26251    }
26252}
26253#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26254#[doc = ""]
26255#[doc = "ID: 54"]
26256#[derive(Debug, Clone, PartialEq)]
26257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26259#[cfg_attr(feature = "ts", derive(TS))]
26260#[cfg_attr(feature = "ts", ts(export))]
26261pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26262    #[doc = "x position 1 / Latitude 1"]
26263    pub p1x: f32,
26264    #[doc = "y position 1 / Longitude 1"]
26265    pub p1y: f32,
26266    #[doc = "z position 1 / Altitude 1"]
26267    pub p1z: f32,
26268    #[doc = "x position 2 / Latitude 2"]
26269    pub p2x: f32,
26270    #[doc = "y position 2 / Longitude 2"]
26271    pub p2y: f32,
26272    #[doc = "z position 2 / Altitude 2"]
26273    pub p2z: f32,
26274    #[doc = "System ID"]
26275    pub target_system: u8,
26276    #[doc = "Component ID"]
26277    pub target_component: u8,
26278    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26279    pub frame: MavFrame,
26280}
26281impl SAFETY_SET_ALLOWED_AREA_DATA {
26282    pub const ENCODED_LEN: usize = 27usize;
26283    pub const DEFAULT: Self = Self {
26284        p1x: 0.0_f32,
26285        p1y: 0.0_f32,
26286        p1z: 0.0_f32,
26287        p2x: 0.0_f32,
26288        p2y: 0.0_f32,
26289        p2z: 0.0_f32,
26290        target_system: 0_u8,
26291        target_component: 0_u8,
26292        frame: MavFrame::DEFAULT,
26293    };
26294    #[cfg(feature = "arbitrary")]
26295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26296        use arbitrary::{Arbitrary, Unstructured};
26297        let mut buf = [0u8; 1024];
26298        rng.fill_bytes(&mut buf);
26299        let mut unstructured = Unstructured::new(&buf);
26300        Self::arbitrary(&mut unstructured).unwrap_or_default()
26301    }
26302}
26303impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26304    fn default() -> Self {
26305        Self::DEFAULT.clone()
26306    }
26307}
26308impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26309    type Message = MavMessage;
26310    const ID: u32 = 54u32;
26311    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26312    const EXTRA_CRC: u8 = 15u8;
26313    const ENCODED_LEN: usize = 27usize;
26314    fn deser(
26315        _version: MavlinkVersion,
26316        __input: &[u8],
26317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26318        let avail_len = __input.len();
26319        let mut payload_buf = [0; Self::ENCODED_LEN];
26320        let mut buf = if avail_len < Self::ENCODED_LEN {
26321            payload_buf[0..avail_len].copy_from_slice(__input);
26322            Bytes::new(&payload_buf)
26323        } else {
26324            Bytes::new(__input)
26325        };
26326        let mut __struct = Self::default();
26327        __struct.p1x = buf.get_f32_le();
26328        __struct.p1y = buf.get_f32_le();
26329        __struct.p1z = buf.get_f32_le();
26330        __struct.p2x = buf.get_f32_le();
26331        __struct.p2y = buf.get_f32_le();
26332        __struct.p2z = buf.get_f32_le();
26333        __struct.target_system = buf.get_u8();
26334        __struct.target_component = buf.get_u8();
26335        let tmp = buf.get_u8();
26336        __struct.frame =
26337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26338                enum_type: "MavFrame",
26339                value: tmp as u32,
26340            })?;
26341        Ok(__struct)
26342    }
26343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26344        let mut __tmp = BytesMut::new(bytes);
26345        #[allow(clippy::absurd_extreme_comparisons)]
26346        #[allow(unused_comparisons)]
26347        if __tmp.remaining() < Self::ENCODED_LEN {
26348            panic!(
26349                "buffer is too small (need {} bytes, but got {})",
26350                Self::ENCODED_LEN,
26351                __tmp.remaining(),
26352            )
26353        }
26354        __tmp.put_f32_le(self.p1x);
26355        __tmp.put_f32_le(self.p1y);
26356        __tmp.put_f32_le(self.p1z);
26357        __tmp.put_f32_le(self.p2x);
26358        __tmp.put_f32_le(self.p2y);
26359        __tmp.put_f32_le(self.p2z);
26360        __tmp.put_u8(self.target_system);
26361        __tmp.put_u8(self.target_component);
26362        __tmp.put_u8(self.frame as u8);
26363        if matches!(version, MavlinkVersion::V2) {
26364            let len = __tmp.len();
26365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26366        } else {
26367            __tmp.len()
26368        }
26369    }
26370}
26371#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26372#[doc = ""]
26373#[doc = "ID: 26"]
26374#[derive(Debug, Clone, PartialEq)]
26375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26377#[cfg_attr(feature = "ts", derive(TS))]
26378#[cfg_attr(feature = "ts", ts(export))]
26379pub struct SCALED_IMU_DATA {
26380    #[doc = "Timestamp (time since system boot)."]
26381    pub time_boot_ms: u32,
26382    #[doc = "X acceleration"]
26383    pub xacc: i16,
26384    #[doc = "Y acceleration"]
26385    pub yacc: i16,
26386    #[doc = "Z acceleration"]
26387    pub zacc: i16,
26388    #[doc = "Angular speed around X axis"]
26389    pub xgyro: i16,
26390    #[doc = "Angular speed around Y axis"]
26391    pub ygyro: i16,
26392    #[doc = "Angular speed around Z axis"]
26393    pub zgyro: i16,
26394    #[doc = "X Magnetic field"]
26395    pub xmag: i16,
26396    #[doc = "Y Magnetic field"]
26397    pub ymag: i16,
26398    #[doc = "Z Magnetic field"]
26399    pub zmag: i16,
26400    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26402    pub temperature: i16,
26403}
26404impl SCALED_IMU_DATA {
26405    pub const ENCODED_LEN: usize = 24usize;
26406    pub const DEFAULT: Self = Self {
26407        time_boot_ms: 0_u32,
26408        xacc: 0_i16,
26409        yacc: 0_i16,
26410        zacc: 0_i16,
26411        xgyro: 0_i16,
26412        ygyro: 0_i16,
26413        zgyro: 0_i16,
26414        xmag: 0_i16,
26415        ymag: 0_i16,
26416        zmag: 0_i16,
26417        temperature: 0_i16,
26418    };
26419    #[cfg(feature = "arbitrary")]
26420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26421        use arbitrary::{Arbitrary, Unstructured};
26422        let mut buf = [0u8; 1024];
26423        rng.fill_bytes(&mut buf);
26424        let mut unstructured = Unstructured::new(&buf);
26425        Self::arbitrary(&mut unstructured).unwrap_or_default()
26426    }
26427}
26428impl Default for SCALED_IMU_DATA {
26429    fn default() -> Self {
26430        Self::DEFAULT.clone()
26431    }
26432}
26433impl MessageData for SCALED_IMU_DATA {
26434    type Message = MavMessage;
26435    const ID: u32 = 26u32;
26436    const NAME: &'static str = "SCALED_IMU";
26437    const EXTRA_CRC: u8 = 170u8;
26438    const ENCODED_LEN: usize = 24usize;
26439    fn deser(
26440        _version: MavlinkVersion,
26441        __input: &[u8],
26442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26443        let avail_len = __input.len();
26444        let mut payload_buf = [0; Self::ENCODED_LEN];
26445        let mut buf = if avail_len < Self::ENCODED_LEN {
26446            payload_buf[0..avail_len].copy_from_slice(__input);
26447            Bytes::new(&payload_buf)
26448        } else {
26449            Bytes::new(__input)
26450        };
26451        let mut __struct = Self::default();
26452        __struct.time_boot_ms = buf.get_u32_le();
26453        __struct.xacc = buf.get_i16_le();
26454        __struct.yacc = buf.get_i16_le();
26455        __struct.zacc = buf.get_i16_le();
26456        __struct.xgyro = buf.get_i16_le();
26457        __struct.ygyro = buf.get_i16_le();
26458        __struct.zgyro = buf.get_i16_le();
26459        __struct.xmag = buf.get_i16_le();
26460        __struct.ymag = buf.get_i16_le();
26461        __struct.zmag = buf.get_i16_le();
26462        __struct.temperature = buf.get_i16_le();
26463        Ok(__struct)
26464    }
26465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26466        let mut __tmp = BytesMut::new(bytes);
26467        #[allow(clippy::absurd_extreme_comparisons)]
26468        #[allow(unused_comparisons)]
26469        if __tmp.remaining() < Self::ENCODED_LEN {
26470            panic!(
26471                "buffer is too small (need {} bytes, but got {})",
26472                Self::ENCODED_LEN,
26473                __tmp.remaining(),
26474            )
26475        }
26476        __tmp.put_u32_le(self.time_boot_ms);
26477        __tmp.put_i16_le(self.xacc);
26478        __tmp.put_i16_le(self.yacc);
26479        __tmp.put_i16_le(self.zacc);
26480        __tmp.put_i16_le(self.xgyro);
26481        __tmp.put_i16_le(self.ygyro);
26482        __tmp.put_i16_le(self.zgyro);
26483        __tmp.put_i16_le(self.xmag);
26484        __tmp.put_i16_le(self.ymag);
26485        __tmp.put_i16_le(self.zmag);
26486        if matches!(version, MavlinkVersion::V2) {
26487            __tmp.put_i16_le(self.temperature);
26488            let len = __tmp.len();
26489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26490        } else {
26491            __tmp.len()
26492        }
26493    }
26494}
26495#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26496#[doc = ""]
26497#[doc = "ID: 116"]
26498#[derive(Debug, Clone, PartialEq)]
26499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26501#[cfg_attr(feature = "ts", derive(TS))]
26502#[cfg_attr(feature = "ts", ts(export))]
26503pub struct SCALED_IMU2_DATA {
26504    #[doc = "Timestamp (time since system boot)."]
26505    pub time_boot_ms: u32,
26506    #[doc = "X acceleration"]
26507    pub xacc: i16,
26508    #[doc = "Y acceleration"]
26509    pub yacc: i16,
26510    #[doc = "Z acceleration"]
26511    pub zacc: i16,
26512    #[doc = "Angular speed around X axis"]
26513    pub xgyro: i16,
26514    #[doc = "Angular speed around Y axis"]
26515    pub ygyro: i16,
26516    #[doc = "Angular speed around Z axis"]
26517    pub zgyro: i16,
26518    #[doc = "X Magnetic field"]
26519    pub xmag: i16,
26520    #[doc = "Y Magnetic field"]
26521    pub ymag: i16,
26522    #[doc = "Z Magnetic field"]
26523    pub zmag: i16,
26524    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26525    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26526    pub temperature: i16,
26527}
26528impl SCALED_IMU2_DATA {
26529    pub const ENCODED_LEN: usize = 24usize;
26530    pub const DEFAULT: Self = Self {
26531        time_boot_ms: 0_u32,
26532        xacc: 0_i16,
26533        yacc: 0_i16,
26534        zacc: 0_i16,
26535        xgyro: 0_i16,
26536        ygyro: 0_i16,
26537        zgyro: 0_i16,
26538        xmag: 0_i16,
26539        ymag: 0_i16,
26540        zmag: 0_i16,
26541        temperature: 0_i16,
26542    };
26543    #[cfg(feature = "arbitrary")]
26544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26545        use arbitrary::{Arbitrary, Unstructured};
26546        let mut buf = [0u8; 1024];
26547        rng.fill_bytes(&mut buf);
26548        let mut unstructured = Unstructured::new(&buf);
26549        Self::arbitrary(&mut unstructured).unwrap_or_default()
26550    }
26551}
26552impl Default for SCALED_IMU2_DATA {
26553    fn default() -> Self {
26554        Self::DEFAULT.clone()
26555    }
26556}
26557impl MessageData for SCALED_IMU2_DATA {
26558    type Message = MavMessage;
26559    const ID: u32 = 116u32;
26560    const NAME: &'static str = "SCALED_IMU2";
26561    const EXTRA_CRC: u8 = 76u8;
26562    const ENCODED_LEN: usize = 24usize;
26563    fn deser(
26564        _version: MavlinkVersion,
26565        __input: &[u8],
26566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26567        let avail_len = __input.len();
26568        let mut payload_buf = [0; Self::ENCODED_LEN];
26569        let mut buf = if avail_len < Self::ENCODED_LEN {
26570            payload_buf[0..avail_len].copy_from_slice(__input);
26571            Bytes::new(&payload_buf)
26572        } else {
26573            Bytes::new(__input)
26574        };
26575        let mut __struct = Self::default();
26576        __struct.time_boot_ms = buf.get_u32_le();
26577        __struct.xacc = buf.get_i16_le();
26578        __struct.yacc = buf.get_i16_le();
26579        __struct.zacc = buf.get_i16_le();
26580        __struct.xgyro = buf.get_i16_le();
26581        __struct.ygyro = buf.get_i16_le();
26582        __struct.zgyro = buf.get_i16_le();
26583        __struct.xmag = buf.get_i16_le();
26584        __struct.ymag = buf.get_i16_le();
26585        __struct.zmag = buf.get_i16_le();
26586        __struct.temperature = buf.get_i16_le();
26587        Ok(__struct)
26588    }
26589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26590        let mut __tmp = BytesMut::new(bytes);
26591        #[allow(clippy::absurd_extreme_comparisons)]
26592        #[allow(unused_comparisons)]
26593        if __tmp.remaining() < Self::ENCODED_LEN {
26594            panic!(
26595                "buffer is too small (need {} bytes, but got {})",
26596                Self::ENCODED_LEN,
26597                __tmp.remaining(),
26598            )
26599        }
26600        __tmp.put_u32_le(self.time_boot_ms);
26601        __tmp.put_i16_le(self.xacc);
26602        __tmp.put_i16_le(self.yacc);
26603        __tmp.put_i16_le(self.zacc);
26604        __tmp.put_i16_le(self.xgyro);
26605        __tmp.put_i16_le(self.ygyro);
26606        __tmp.put_i16_le(self.zgyro);
26607        __tmp.put_i16_le(self.xmag);
26608        __tmp.put_i16_le(self.ymag);
26609        __tmp.put_i16_le(self.zmag);
26610        if matches!(version, MavlinkVersion::V2) {
26611            __tmp.put_i16_le(self.temperature);
26612            let len = __tmp.len();
26613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26614        } else {
26615            __tmp.len()
26616        }
26617    }
26618}
26619#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26620#[doc = ""]
26621#[doc = "ID: 129"]
26622#[derive(Debug, Clone, PartialEq)]
26623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26625#[cfg_attr(feature = "ts", derive(TS))]
26626#[cfg_attr(feature = "ts", ts(export))]
26627pub struct SCALED_IMU3_DATA {
26628    #[doc = "Timestamp (time since system boot)."]
26629    pub time_boot_ms: u32,
26630    #[doc = "X acceleration"]
26631    pub xacc: i16,
26632    #[doc = "Y acceleration"]
26633    pub yacc: i16,
26634    #[doc = "Z acceleration"]
26635    pub zacc: i16,
26636    #[doc = "Angular speed around X axis"]
26637    pub xgyro: i16,
26638    #[doc = "Angular speed around Y axis"]
26639    pub ygyro: i16,
26640    #[doc = "Angular speed around Z axis"]
26641    pub zgyro: i16,
26642    #[doc = "X Magnetic field"]
26643    pub xmag: i16,
26644    #[doc = "Y Magnetic field"]
26645    pub ymag: i16,
26646    #[doc = "Z Magnetic field"]
26647    pub zmag: i16,
26648    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26650    pub temperature: i16,
26651}
26652impl SCALED_IMU3_DATA {
26653    pub const ENCODED_LEN: usize = 24usize;
26654    pub const DEFAULT: Self = Self {
26655        time_boot_ms: 0_u32,
26656        xacc: 0_i16,
26657        yacc: 0_i16,
26658        zacc: 0_i16,
26659        xgyro: 0_i16,
26660        ygyro: 0_i16,
26661        zgyro: 0_i16,
26662        xmag: 0_i16,
26663        ymag: 0_i16,
26664        zmag: 0_i16,
26665        temperature: 0_i16,
26666    };
26667    #[cfg(feature = "arbitrary")]
26668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26669        use arbitrary::{Arbitrary, Unstructured};
26670        let mut buf = [0u8; 1024];
26671        rng.fill_bytes(&mut buf);
26672        let mut unstructured = Unstructured::new(&buf);
26673        Self::arbitrary(&mut unstructured).unwrap_or_default()
26674    }
26675}
26676impl Default for SCALED_IMU3_DATA {
26677    fn default() -> Self {
26678        Self::DEFAULT.clone()
26679    }
26680}
26681impl MessageData for SCALED_IMU3_DATA {
26682    type Message = MavMessage;
26683    const ID: u32 = 129u32;
26684    const NAME: &'static str = "SCALED_IMU3";
26685    const EXTRA_CRC: u8 = 46u8;
26686    const ENCODED_LEN: usize = 24usize;
26687    fn deser(
26688        _version: MavlinkVersion,
26689        __input: &[u8],
26690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26691        let avail_len = __input.len();
26692        let mut payload_buf = [0; Self::ENCODED_LEN];
26693        let mut buf = if avail_len < Self::ENCODED_LEN {
26694            payload_buf[0..avail_len].copy_from_slice(__input);
26695            Bytes::new(&payload_buf)
26696        } else {
26697            Bytes::new(__input)
26698        };
26699        let mut __struct = Self::default();
26700        __struct.time_boot_ms = buf.get_u32_le();
26701        __struct.xacc = buf.get_i16_le();
26702        __struct.yacc = buf.get_i16_le();
26703        __struct.zacc = buf.get_i16_le();
26704        __struct.xgyro = buf.get_i16_le();
26705        __struct.ygyro = buf.get_i16_le();
26706        __struct.zgyro = buf.get_i16_le();
26707        __struct.xmag = buf.get_i16_le();
26708        __struct.ymag = buf.get_i16_le();
26709        __struct.zmag = buf.get_i16_le();
26710        __struct.temperature = buf.get_i16_le();
26711        Ok(__struct)
26712    }
26713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26714        let mut __tmp = BytesMut::new(bytes);
26715        #[allow(clippy::absurd_extreme_comparisons)]
26716        #[allow(unused_comparisons)]
26717        if __tmp.remaining() < Self::ENCODED_LEN {
26718            panic!(
26719                "buffer is too small (need {} bytes, but got {})",
26720                Self::ENCODED_LEN,
26721                __tmp.remaining(),
26722            )
26723        }
26724        __tmp.put_u32_le(self.time_boot_ms);
26725        __tmp.put_i16_le(self.xacc);
26726        __tmp.put_i16_le(self.yacc);
26727        __tmp.put_i16_le(self.zacc);
26728        __tmp.put_i16_le(self.xgyro);
26729        __tmp.put_i16_le(self.ygyro);
26730        __tmp.put_i16_le(self.zgyro);
26731        __tmp.put_i16_le(self.xmag);
26732        __tmp.put_i16_le(self.ymag);
26733        __tmp.put_i16_le(self.zmag);
26734        if matches!(version, MavlinkVersion::V2) {
26735            __tmp.put_i16_le(self.temperature);
26736            let len = __tmp.len();
26737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26738        } else {
26739            __tmp.len()
26740        }
26741    }
26742}
26743#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26744#[doc = ""]
26745#[doc = "ID: 29"]
26746#[derive(Debug, Clone, PartialEq)]
26747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26749#[cfg_attr(feature = "ts", derive(TS))]
26750#[cfg_attr(feature = "ts", ts(export))]
26751pub struct SCALED_PRESSURE_DATA {
26752    #[doc = "Timestamp (time since system boot)."]
26753    pub time_boot_ms: u32,
26754    #[doc = "Absolute pressure"]
26755    pub press_abs: f32,
26756    #[doc = "Differential pressure 1"]
26757    pub press_diff: f32,
26758    #[doc = "Absolute pressure temperature"]
26759    pub temperature: i16,
26760    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26761    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26762    pub temperature_press_diff: i16,
26763}
26764impl SCALED_PRESSURE_DATA {
26765    pub const ENCODED_LEN: usize = 16usize;
26766    pub const DEFAULT: Self = Self {
26767        time_boot_ms: 0_u32,
26768        press_abs: 0.0_f32,
26769        press_diff: 0.0_f32,
26770        temperature: 0_i16,
26771        temperature_press_diff: 0_i16,
26772    };
26773    #[cfg(feature = "arbitrary")]
26774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26775        use arbitrary::{Arbitrary, Unstructured};
26776        let mut buf = [0u8; 1024];
26777        rng.fill_bytes(&mut buf);
26778        let mut unstructured = Unstructured::new(&buf);
26779        Self::arbitrary(&mut unstructured).unwrap_or_default()
26780    }
26781}
26782impl Default for SCALED_PRESSURE_DATA {
26783    fn default() -> Self {
26784        Self::DEFAULT.clone()
26785    }
26786}
26787impl MessageData for SCALED_PRESSURE_DATA {
26788    type Message = MavMessage;
26789    const ID: u32 = 29u32;
26790    const NAME: &'static str = "SCALED_PRESSURE";
26791    const EXTRA_CRC: u8 = 115u8;
26792    const ENCODED_LEN: usize = 16usize;
26793    fn deser(
26794        _version: MavlinkVersion,
26795        __input: &[u8],
26796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26797        let avail_len = __input.len();
26798        let mut payload_buf = [0; Self::ENCODED_LEN];
26799        let mut buf = if avail_len < Self::ENCODED_LEN {
26800            payload_buf[0..avail_len].copy_from_slice(__input);
26801            Bytes::new(&payload_buf)
26802        } else {
26803            Bytes::new(__input)
26804        };
26805        let mut __struct = Self::default();
26806        __struct.time_boot_ms = buf.get_u32_le();
26807        __struct.press_abs = buf.get_f32_le();
26808        __struct.press_diff = buf.get_f32_le();
26809        __struct.temperature = buf.get_i16_le();
26810        __struct.temperature_press_diff = buf.get_i16_le();
26811        Ok(__struct)
26812    }
26813    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26814        let mut __tmp = BytesMut::new(bytes);
26815        #[allow(clippy::absurd_extreme_comparisons)]
26816        #[allow(unused_comparisons)]
26817        if __tmp.remaining() < Self::ENCODED_LEN {
26818            panic!(
26819                "buffer is too small (need {} bytes, but got {})",
26820                Self::ENCODED_LEN,
26821                __tmp.remaining(),
26822            )
26823        }
26824        __tmp.put_u32_le(self.time_boot_ms);
26825        __tmp.put_f32_le(self.press_abs);
26826        __tmp.put_f32_le(self.press_diff);
26827        __tmp.put_i16_le(self.temperature);
26828        if matches!(version, MavlinkVersion::V2) {
26829            __tmp.put_i16_le(self.temperature_press_diff);
26830            let len = __tmp.len();
26831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26832        } else {
26833            __tmp.len()
26834        }
26835    }
26836}
26837#[doc = "Barometer readings for 2nd barometer."]
26838#[doc = ""]
26839#[doc = "ID: 137"]
26840#[derive(Debug, Clone, PartialEq)]
26841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26843#[cfg_attr(feature = "ts", derive(TS))]
26844#[cfg_attr(feature = "ts", ts(export))]
26845pub struct SCALED_PRESSURE2_DATA {
26846    #[doc = "Timestamp (time since system boot)."]
26847    pub time_boot_ms: u32,
26848    #[doc = "Absolute pressure"]
26849    pub press_abs: f32,
26850    #[doc = "Differential pressure"]
26851    pub press_diff: f32,
26852    #[doc = "Absolute pressure temperature"]
26853    pub temperature: i16,
26854    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26856    pub temperature_press_diff: i16,
26857}
26858impl SCALED_PRESSURE2_DATA {
26859    pub const ENCODED_LEN: usize = 16usize;
26860    pub const DEFAULT: Self = Self {
26861        time_boot_ms: 0_u32,
26862        press_abs: 0.0_f32,
26863        press_diff: 0.0_f32,
26864        temperature: 0_i16,
26865        temperature_press_diff: 0_i16,
26866    };
26867    #[cfg(feature = "arbitrary")]
26868    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26869        use arbitrary::{Arbitrary, Unstructured};
26870        let mut buf = [0u8; 1024];
26871        rng.fill_bytes(&mut buf);
26872        let mut unstructured = Unstructured::new(&buf);
26873        Self::arbitrary(&mut unstructured).unwrap_or_default()
26874    }
26875}
26876impl Default for SCALED_PRESSURE2_DATA {
26877    fn default() -> Self {
26878        Self::DEFAULT.clone()
26879    }
26880}
26881impl MessageData for SCALED_PRESSURE2_DATA {
26882    type Message = MavMessage;
26883    const ID: u32 = 137u32;
26884    const NAME: &'static str = "SCALED_PRESSURE2";
26885    const EXTRA_CRC: u8 = 195u8;
26886    const ENCODED_LEN: usize = 16usize;
26887    fn deser(
26888        _version: MavlinkVersion,
26889        __input: &[u8],
26890    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26891        let avail_len = __input.len();
26892        let mut payload_buf = [0; Self::ENCODED_LEN];
26893        let mut buf = if avail_len < Self::ENCODED_LEN {
26894            payload_buf[0..avail_len].copy_from_slice(__input);
26895            Bytes::new(&payload_buf)
26896        } else {
26897            Bytes::new(__input)
26898        };
26899        let mut __struct = Self::default();
26900        __struct.time_boot_ms = buf.get_u32_le();
26901        __struct.press_abs = buf.get_f32_le();
26902        __struct.press_diff = buf.get_f32_le();
26903        __struct.temperature = buf.get_i16_le();
26904        __struct.temperature_press_diff = buf.get_i16_le();
26905        Ok(__struct)
26906    }
26907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26908        let mut __tmp = BytesMut::new(bytes);
26909        #[allow(clippy::absurd_extreme_comparisons)]
26910        #[allow(unused_comparisons)]
26911        if __tmp.remaining() < Self::ENCODED_LEN {
26912            panic!(
26913                "buffer is too small (need {} bytes, but got {})",
26914                Self::ENCODED_LEN,
26915                __tmp.remaining(),
26916            )
26917        }
26918        __tmp.put_u32_le(self.time_boot_ms);
26919        __tmp.put_f32_le(self.press_abs);
26920        __tmp.put_f32_le(self.press_diff);
26921        __tmp.put_i16_le(self.temperature);
26922        if matches!(version, MavlinkVersion::V2) {
26923            __tmp.put_i16_le(self.temperature_press_diff);
26924            let len = __tmp.len();
26925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26926        } else {
26927            __tmp.len()
26928        }
26929    }
26930}
26931#[doc = "Barometer readings for 3rd barometer."]
26932#[doc = ""]
26933#[doc = "ID: 143"]
26934#[derive(Debug, Clone, PartialEq)]
26935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26937#[cfg_attr(feature = "ts", derive(TS))]
26938#[cfg_attr(feature = "ts", ts(export))]
26939pub struct SCALED_PRESSURE3_DATA {
26940    #[doc = "Timestamp (time since system boot)."]
26941    pub time_boot_ms: u32,
26942    #[doc = "Absolute pressure"]
26943    pub press_abs: f32,
26944    #[doc = "Differential pressure"]
26945    pub press_diff: f32,
26946    #[doc = "Absolute pressure temperature"]
26947    pub temperature: i16,
26948    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26949    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26950    pub temperature_press_diff: i16,
26951}
26952impl SCALED_PRESSURE3_DATA {
26953    pub const ENCODED_LEN: usize = 16usize;
26954    pub const DEFAULT: Self = Self {
26955        time_boot_ms: 0_u32,
26956        press_abs: 0.0_f32,
26957        press_diff: 0.0_f32,
26958        temperature: 0_i16,
26959        temperature_press_diff: 0_i16,
26960    };
26961    #[cfg(feature = "arbitrary")]
26962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26963        use arbitrary::{Arbitrary, Unstructured};
26964        let mut buf = [0u8; 1024];
26965        rng.fill_bytes(&mut buf);
26966        let mut unstructured = Unstructured::new(&buf);
26967        Self::arbitrary(&mut unstructured).unwrap_or_default()
26968    }
26969}
26970impl Default for SCALED_PRESSURE3_DATA {
26971    fn default() -> Self {
26972        Self::DEFAULT.clone()
26973    }
26974}
26975impl MessageData for SCALED_PRESSURE3_DATA {
26976    type Message = MavMessage;
26977    const ID: u32 = 143u32;
26978    const NAME: &'static str = "SCALED_PRESSURE3";
26979    const EXTRA_CRC: u8 = 131u8;
26980    const ENCODED_LEN: usize = 16usize;
26981    fn deser(
26982        _version: MavlinkVersion,
26983        __input: &[u8],
26984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26985        let avail_len = __input.len();
26986        let mut payload_buf = [0; Self::ENCODED_LEN];
26987        let mut buf = if avail_len < Self::ENCODED_LEN {
26988            payload_buf[0..avail_len].copy_from_slice(__input);
26989            Bytes::new(&payload_buf)
26990        } else {
26991            Bytes::new(__input)
26992        };
26993        let mut __struct = Self::default();
26994        __struct.time_boot_ms = buf.get_u32_le();
26995        __struct.press_abs = buf.get_f32_le();
26996        __struct.press_diff = buf.get_f32_le();
26997        __struct.temperature = buf.get_i16_le();
26998        __struct.temperature_press_diff = buf.get_i16_le();
26999        Ok(__struct)
27000    }
27001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27002        let mut __tmp = BytesMut::new(bytes);
27003        #[allow(clippy::absurd_extreme_comparisons)]
27004        #[allow(unused_comparisons)]
27005        if __tmp.remaining() < Self::ENCODED_LEN {
27006            panic!(
27007                "buffer is too small (need {} bytes, but got {})",
27008                Self::ENCODED_LEN,
27009                __tmp.remaining(),
27010            )
27011        }
27012        __tmp.put_u32_le(self.time_boot_ms);
27013        __tmp.put_f32_le(self.press_abs);
27014        __tmp.put_f32_le(self.press_diff);
27015        __tmp.put_i16_le(self.temperature);
27016        if matches!(version, MavlinkVersion::V2) {
27017            __tmp.put_i16_le(self.temperature_press_diff);
27018            let len = __tmp.len();
27019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27020        } else {
27021            __tmp.len()
27022        }
27023    }
27024}
27025#[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
27026#[doc = ""]
27027#[doc = "ID: 183"]
27028#[derive(Debug, Clone, PartialEq)]
27029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27031#[cfg_attr(feature = "ts", derive(TS))]
27032#[cfg_attr(feature = "ts", ts(export))]
27033pub struct SCRIPT_COUNT_DATA {
27034    #[doc = "Number of script items in the sequence"]
27035    pub count: u16,
27036    #[doc = "System ID"]
27037    pub target_system: u8,
27038    #[doc = "Component ID"]
27039    pub target_component: u8,
27040}
27041impl SCRIPT_COUNT_DATA {
27042    pub const ENCODED_LEN: usize = 4usize;
27043    pub const DEFAULT: Self = Self {
27044        count: 0_u16,
27045        target_system: 0_u8,
27046        target_component: 0_u8,
27047    };
27048    #[cfg(feature = "arbitrary")]
27049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27050        use arbitrary::{Arbitrary, Unstructured};
27051        let mut buf = [0u8; 1024];
27052        rng.fill_bytes(&mut buf);
27053        let mut unstructured = Unstructured::new(&buf);
27054        Self::arbitrary(&mut unstructured).unwrap_or_default()
27055    }
27056}
27057impl Default for SCRIPT_COUNT_DATA {
27058    fn default() -> Self {
27059        Self::DEFAULT.clone()
27060    }
27061}
27062impl MessageData for SCRIPT_COUNT_DATA {
27063    type Message = MavMessage;
27064    const ID: u32 = 183u32;
27065    const NAME: &'static str = "SCRIPT_COUNT";
27066    const EXTRA_CRC: u8 = 186u8;
27067    const ENCODED_LEN: usize = 4usize;
27068    fn deser(
27069        _version: MavlinkVersion,
27070        __input: &[u8],
27071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27072        let avail_len = __input.len();
27073        let mut payload_buf = [0; Self::ENCODED_LEN];
27074        let mut buf = if avail_len < Self::ENCODED_LEN {
27075            payload_buf[0..avail_len].copy_from_slice(__input);
27076            Bytes::new(&payload_buf)
27077        } else {
27078            Bytes::new(__input)
27079        };
27080        let mut __struct = Self::default();
27081        __struct.count = buf.get_u16_le();
27082        __struct.target_system = buf.get_u8();
27083        __struct.target_component = buf.get_u8();
27084        Ok(__struct)
27085    }
27086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27087        let mut __tmp = BytesMut::new(bytes);
27088        #[allow(clippy::absurd_extreme_comparisons)]
27089        #[allow(unused_comparisons)]
27090        if __tmp.remaining() < Self::ENCODED_LEN {
27091            panic!(
27092                "buffer is too small (need {} bytes, but got {})",
27093                Self::ENCODED_LEN,
27094                __tmp.remaining(),
27095            )
27096        }
27097        __tmp.put_u16_le(self.count);
27098        __tmp.put_u8(self.target_system);
27099        __tmp.put_u8(self.target_component);
27100        if matches!(version, MavlinkVersion::V2) {
27101            let len = __tmp.len();
27102            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27103        } else {
27104            __tmp.len()
27105        }
27106    }
27107}
27108#[doc = "This message informs about the currently active SCRIPT."]
27109#[doc = ""]
27110#[doc = "ID: 184"]
27111#[derive(Debug, Clone, PartialEq)]
27112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27114#[cfg_attr(feature = "ts", derive(TS))]
27115#[cfg_attr(feature = "ts", ts(export))]
27116pub struct SCRIPT_CURRENT_DATA {
27117    #[doc = "Active Sequence"]
27118    pub seq: u16,
27119}
27120impl SCRIPT_CURRENT_DATA {
27121    pub const ENCODED_LEN: usize = 2usize;
27122    pub const DEFAULT: Self = Self { seq: 0_u16 };
27123    #[cfg(feature = "arbitrary")]
27124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27125        use arbitrary::{Arbitrary, Unstructured};
27126        let mut buf = [0u8; 1024];
27127        rng.fill_bytes(&mut buf);
27128        let mut unstructured = Unstructured::new(&buf);
27129        Self::arbitrary(&mut unstructured).unwrap_or_default()
27130    }
27131}
27132impl Default for SCRIPT_CURRENT_DATA {
27133    fn default() -> Self {
27134        Self::DEFAULT.clone()
27135    }
27136}
27137impl MessageData for SCRIPT_CURRENT_DATA {
27138    type Message = MavMessage;
27139    const ID: u32 = 184u32;
27140    const NAME: &'static str = "SCRIPT_CURRENT";
27141    const EXTRA_CRC: u8 = 40u8;
27142    const ENCODED_LEN: usize = 2usize;
27143    fn deser(
27144        _version: MavlinkVersion,
27145        __input: &[u8],
27146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27147        let avail_len = __input.len();
27148        let mut payload_buf = [0; Self::ENCODED_LEN];
27149        let mut buf = if avail_len < Self::ENCODED_LEN {
27150            payload_buf[0..avail_len].copy_from_slice(__input);
27151            Bytes::new(&payload_buf)
27152        } else {
27153            Bytes::new(__input)
27154        };
27155        let mut __struct = Self::default();
27156        __struct.seq = buf.get_u16_le();
27157        Ok(__struct)
27158    }
27159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27160        let mut __tmp = BytesMut::new(bytes);
27161        #[allow(clippy::absurd_extreme_comparisons)]
27162        #[allow(unused_comparisons)]
27163        if __tmp.remaining() < Self::ENCODED_LEN {
27164            panic!(
27165                "buffer is too small (need {} bytes, but got {})",
27166                Self::ENCODED_LEN,
27167                __tmp.remaining(),
27168            )
27169        }
27170        __tmp.put_u16_le(self.seq);
27171        if matches!(version, MavlinkVersion::V2) {
27172            let len = __tmp.len();
27173            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27174        } else {
27175            __tmp.len()
27176        }
27177    }
27178}
27179#[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
27180#[doc = ""]
27181#[doc = "ID: 180"]
27182#[derive(Debug, Clone, PartialEq)]
27183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27185#[cfg_attr(feature = "ts", derive(TS))]
27186#[cfg_attr(feature = "ts", ts(export))]
27187pub struct SCRIPT_ITEM_DATA {
27188    #[doc = "Sequence"]
27189    pub seq: u16,
27190    #[doc = "System ID"]
27191    pub target_system: u8,
27192    #[doc = "Component ID"]
27193    pub target_component: u8,
27194    #[doc = "The name of the mission script, NULL terminated."]
27195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27196    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27197    pub name: [u8; 50],
27198}
27199impl SCRIPT_ITEM_DATA {
27200    pub const ENCODED_LEN: usize = 54usize;
27201    pub const DEFAULT: Self = Self {
27202        seq: 0_u16,
27203        target_system: 0_u8,
27204        target_component: 0_u8,
27205        name: [0_u8; 50usize],
27206    };
27207    #[cfg(feature = "arbitrary")]
27208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27209        use arbitrary::{Arbitrary, Unstructured};
27210        let mut buf = [0u8; 1024];
27211        rng.fill_bytes(&mut buf);
27212        let mut unstructured = Unstructured::new(&buf);
27213        Self::arbitrary(&mut unstructured).unwrap_or_default()
27214    }
27215}
27216impl Default for SCRIPT_ITEM_DATA {
27217    fn default() -> Self {
27218        Self::DEFAULT.clone()
27219    }
27220}
27221impl MessageData for SCRIPT_ITEM_DATA {
27222    type Message = MavMessage;
27223    const ID: u32 = 180u32;
27224    const NAME: &'static str = "SCRIPT_ITEM";
27225    const EXTRA_CRC: u8 = 231u8;
27226    const ENCODED_LEN: usize = 54usize;
27227    fn deser(
27228        _version: MavlinkVersion,
27229        __input: &[u8],
27230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27231        let avail_len = __input.len();
27232        let mut payload_buf = [0; Self::ENCODED_LEN];
27233        let mut buf = if avail_len < Self::ENCODED_LEN {
27234            payload_buf[0..avail_len].copy_from_slice(__input);
27235            Bytes::new(&payload_buf)
27236        } else {
27237            Bytes::new(__input)
27238        };
27239        let mut __struct = Self::default();
27240        __struct.seq = buf.get_u16_le();
27241        __struct.target_system = buf.get_u8();
27242        __struct.target_component = buf.get_u8();
27243        for v in &mut __struct.name {
27244            let val = buf.get_u8();
27245            *v = val;
27246        }
27247        Ok(__struct)
27248    }
27249    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27250        let mut __tmp = BytesMut::new(bytes);
27251        #[allow(clippy::absurd_extreme_comparisons)]
27252        #[allow(unused_comparisons)]
27253        if __tmp.remaining() < Self::ENCODED_LEN {
27254            panic!(
27255                "buffer is too small (need {} bytes, but got {})",
27256                Self::ENCODED_LEN,
27257                __tmp.remaining(),
27258            )
27259        }
27260        __tmp.put_u16_le(self.seq);
27261        __tmp.put_u8(self.target_system);
27262        __tmp.put_u8(self.target_component);
27263        for val in &self.name {
27264            __tmp.put_u8(*val);
27265        }
27266        if matches!(version, MavlinkVersion::V2) {
27267            let len = __tmp.len();
27268            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27269        } else {
27270            __tmp.len()
27271        }
27272    }
27273}
27274#[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
27275#[doc = ""]
27276#[doc = "ID: 181"]
27277#[derive(Debug, Clone, PartialEq)]
27278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27280#[cfg_attr(feature = "ts", derive(TS))]
27281#[cfg_attr(feature = "ts", ts(export))]
27282pub struct SCRIPT_REQUEST_DATA {
27283    #[doc = "Sequence"]
27284    pub seq: u16,
27285    #[doc = "System ID"]
27286    pub target_system: u8,
27287    #[doc = "Component ID"]
27288    pub target_component: u8,
27289}
27290impl SCRIPT_REQUEST_DATA {
27291    pub const ENCODED_LEN: usize = 4usize;
27292    pub const DEFAULT: Self = Self {
27293        seq: 0_u16,
27294        target_system: 0_u8,
27295        target_component: 0_u8,
27296    };
27297    #[cfg(feature = "arbitrary")]
27298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27299        use arbitrary::{Arbitrary, Unstructured};
27300        let mut buf = [0u8; 1024];
27301        rng.fill_bytes(&mut buf);
27302        let mut unstructured = Unstructured::new(&buf);
27303        Self::arbitrary(&mut unstructured).unwrap_or_default()
27304    }
27305}
27306impl Default for SCRIPT_REQUEST_DATA {
27307    fn default() -> Self {
27308        Self::DEFAULT.clone()
27309    }
27310}
27311impl MessageData for SCRIPT_REQUEST_DATA {
27312    type Message = MavMessage;
27313    const ID: u32 = 181u32;
27314    const NAME: &'static str = "SCRIPT_REQUEST";
27315    const EXTRA_CRC: u8 = 129u8;
27316    const ENCODED_LEN: usize = 4usize;
27317    fn deser(
27318        _version: MavlinkVersion,
27319        __input: &[u8],
27320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27321        let avail_len = __input.len();
27322        let mut payload_buf = [0; Self::ENCODED_LEN];
27323        let mut buf = if avail_len < Self::ENCODED_LEN {
27324            payload_buf[0..avail_len].copy_from_slice(__input);
27325            Bytes::new(&payload_buf)
27326        } else {
27327            Bytes::new(__input)
27328        };
27329        let mut __struct = Self::default();
27330        __struct.seq = buf.get_u16_le();
27331        __struct.target_system = buf.get_u8();
27332        __struct.target_component = buf.get_u8();
27333        Ok(__struct)
27334    }
27335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27336        let mut __tmp = BytesMut::new(bytes);
27337        #[allow(clippy::absurd_extreme_comparisons)]
27338        #[allow(unused_comparisons)]
27339        if __tmp.remaining() < Self::ENCODED_LEN {
27340            panic!(
27341                "buffer is too small (need {} bytes, but got {})",
27342                Self::ENCODED_LEN,
27343                __tmp.remaining(),
27344            )
27345        }
27346        __tmp.put_u16_le(self.seq);
27347        __tmp.put_u8(self.target_system);
27348        __tmp.put_u8(self.target_component);
27349        if matches!(version, MavlinkVersion::V2) {
27350            let len = __tmp.len();
27351            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27352        } else {
27353            __tmp.len()
27354        }
27355    }
27356}
27357#[doc = "Request the overall list of mission items from the system/component."]
27358#[doc = ""]
27359#[doc = "ID: 182"]
27360#[derive(Debug, Clone, PartialEq)]
27361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27363#[cfg_attr(feature = "ts", derive(TS))]
27364#[cfg_attr(feature = "ts", ts(export))]
27365pub struct SCRIPT_REQUEST_LIST_DATA {
27366    #[doc = "System ID"]
27367    pub target_system: u8,
27368    #[doc = "Component ID"]
27369    pub target_component: u8,
27370}
27371impl SCRIPT_REQUEST_LIST_DATA {
27372    pub const ENCODED_LEN: usize = 2usize;
27373    pub const DEFAULT: Self = Self {
27374        target_system: 0_u8,
27375        target_component: 0_u8,
27376    };
27377    #[cfg(feature = "arbitrary")]
27378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27379        use arbitrary::{Arbitrary, Unstructured};
27380        let mut buf = [0u8; 1024];
27381        rng.fill_bytes(&mut buf);
27382        let mut unstructured = Unstructured::new(&buf);
27383        Self::arbitrary(&mut unstructured).unwrap_or_default()
27384    }
27385}
27386impl Default for SCRIPT_REQUEST_LIST_DATA {
27387    fn default() -> Self {
27388        Self::DEFAULT.clone()
27389    }
27390}
27391impl MessageData for SCRIPT_REQUEST_LIST_DATA {
27392    type Message = MavMessage;
27393    const ID: u32 = 182u32;
27394    const NAME: &'static str = "SCRIPT_REQUEST_LIST";
27395    const EXTRA_CRC: u8 = 115u8;
27396    const ENCODED_LEN: usize = 2usize;
27397    fn deser(
27398        _version: MavlinkVersion,
27399        __input: &[u8],
27400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27401        let avail_len = __input.len();
27402        let mut payload_buf = [0; Self::ENCODED_LEN];
27403        let mut buf = if avail_len < Self::ENCODED_LEN {
27404            payload_buf[0..avail_len].copy_from_slice(__input);
27405            Bytes::new(&payload_buf)
27406        } else {
27407            Bytes::new(__input)
27408        };
27409        let mut __struct = Self::default();
27410        __struct.target_system = buf.get_u8();
27411        __struct.target_component = buf.get_u8();
27412        Ok(__struct)
27413    }
27414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27415        let mut __tmp = BytesMut::new(bytes);
27416        #[allow(clippy::absurd_extreme_comparisons)]
27417        #[allow(unused_comparisons)]
27418        if __tmp.remaining() < Self::ENCODED_LEN {
27419            panic!(
27420                "buffer is too small (need {} bytes, but got {})",
27421                Self::ENCODED_LEN,
27422                __tmp.remaining(),
27423            )
27424        }
27425        __tmp.put_u8(self.target_system);
27426        __tmp.put_u8(self.target_component);
27427        if matches!(version, MavlinkVersion::V2) {
27428            let len = __tmp.len();
27429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27430        } else {
27431            __tmp.len()
27432        }
27433    }
27434}
27435#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27436#[doc = ""]
27437#[doc = "ID: 126"]
27438#[derive(Debug, Clone, PartialEq)]
27439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27441#[cfg_attr(feature = "ts", derive(TS))]
27442#[cfg_attr(feature = "ts", ts(export))]
27443pub struct SERIAL_CONTROL_DATA {
27444    #[doc = "Baudrate of transfer. Zero means no change."]
27445    pub baudrate: u32,
27446    #[doc = "Timeout for reply data"]
27447    pub timeout: u16,
27448    #[doc = "Serial control device type."]
27449    pub device: SerialControlDev,
27450    #[doc = "Bitmap of serial control flags."]
27451    pub flags: SerialControlFlag,
27452    #[doc = "how many bytes in this transfer"]
27453    pub count: u8,
27454    #[doc = "serial data"]
27455    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27456    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27457    pub data: [u8; 70],
27458    #[doc = "System ID"]
27459    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27460    pub target_system: u8,
27461    #[doc = "Component ID"]
27462    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27463    pub target_component: u8,
27464}
27465impl SERIAL_CONTROL_DATA {
27466    pub const ENCODED_LEN: usize = 81usize;
27467    pub const DEFAULT: Self = Self {
27468        baudrate: 0_u32,
27469        timeout: 0_u16,
27470        device: SerialControlDev::DEFAULT,
27471        flags: SerialControlFlag::DEFAULT,
27472        count: 0_u8,
27473        data: [0_u8; 70usize],
27474        target_system: 0_u8,
27475        target_component: 0_u8,
27476    };
27477    #[cfg(feature = "arbitrary")]
27478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27479        use arbitrary::{Arbitrary, Unstructured};
27480        let mut buf = [0u8; 1024];
27481        rng.fill_bytes(&mut buf);
27482        let mut unstructured = Unstructured::new(&buf);
27483        Self::arbitrary(&mut unstructured).unwrap_or_default()
27484    }
27485}
27486impl Default for SERIAL_CONTROL_DATA {
27487    fn default() -> Self {
27488        Self::DEFAULT.clone()
27489    }
27490}
27491impl MessageData for SERIAL_CONTROL_DATA {
27492    type Message = MavMessage;
27493    const ID: u32 = 126u32;
27494    const NAME: &'static str = "SERIAL_CONTROL";
27495    const EXTRA_CRC: u8 = 220u8;
27496    const ENCODED_LEN: usize = 81usize;
27497    fn deser(
27498        _version: MavlinkVersion,
27499        __input: &[u8],
27500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27501        let avail_len = __input.len();
27502        let mut payload_buf = [0; Self::ENCODED_LEN];
27503        let mut buf = if avail_len < Self::ENCODED_LEN {
27504            payload_buf[0..avail_len].copy_from_slice(__input);
27505            Bytes::new(&payload_buf)
27506        } else {
27507            Bytes::new(__input)
27508        };
27509        let mut __struct = Self::default();
27510        __struct.baudrate = buf.get_u32_le();
27511        __struct.timeout = buf.get_u16_le();
27512        let tmp = buf.get_u8();
27513        __struct.device =
27514            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27515                enum_type: "SerialControlDev",
27516                value: tmp as u32,
27517            })?;
27518        let tmp = buf.get_u8();
27519        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27520            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27521                flag_type: "SerialControlFlag",
27522                value: tmp as u32,
27523            })?;
27524        __struct.count = buf.get_u8();
27525        for v in &mut __struct.data {
27526            let val = buf.get_u8();
27527            *v = val;
27528        }
27529        __struct.target_system = buf.get_u8();
27530        __struct.target_component = buf.get_u8();
27531        Ok(__struct)
27532    }
27533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27534        let mut __tmp = BytesMut::new(bytes);
27535        #[allow(clippy::absurd_extreme_comparisons)]
27536        #[allow(unused_comparisons)]
27537        if __tmp.remaining() < Self::ENCODED_LEN {
27538            panic!(
27539                "buffer is too small (need {} bytes, but got {})",
27540                Self::ENCODED_LEN,
27541                __tmp.remaining(),
27542            )
27543        }
27544        __tmp.put_u32_le(self.baudrate);
27545        __tmp.put_u16_le(self.timeout);
27546        __tmp.put_u8(self.device as u8);
27547        __tmp.put_u8(self.flags.bits());
27548        __tmp.put_u8(self.count);
27549        for val in &self.data {
27550            __tmp.put_u8(*val);
27551        }
27552        if matches!(version, MavlinkVersion::V2) {
27553            __tmp.put_u8(self.target_system);
27554            __tmp.put_u8(self.target_component);
27555            let len = __tmp.len();
27556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27557        } else {
27558            __tmp.len()
27559        }
27560    }
27561}
27562#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27563#[doc = ""]
27564#[doc = "ID: 36"]
27565#[derive(Debug, Clone, PartialEq)]
27566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27568#[cfg_attr(feature = "ts", derive(TS))]
27569#[cfg_attr(feature = "ts", ts(export))]
27570pub struct SERVO_OUTPUT_RAW_DATA {
27571    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27572    pub time_usec: u32,
27573    #[doc = "Servo output 1 value"]
27574    pub servo1_raw: u16,
27575    #[doc = "Servo output 2 value"]
27576    pub servo2_raw: u16,
27577    #[doc = "Servo output 3 value"]
27578    pub servo3_raw: u16,
27579    #[doc = "Servo output 4 value"]
27580    pub servo4_raw: u16,
27581    #[doc = "Servo output 5 value"]
27582    pub servo5_raw: u16,
27583    #[doc = "Servo output 6 value"]
27584    pub servo6_raw: u16,
27585    #[doc = "Servo output 7 value"]
27586    pub servo7_raw: u16,
27587    #[doc = "Servo output 8 value"]
27588    pub servo8_raw: u16,
27589    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27590    pub port: u8,
27591    #[doc = "Servo output 9 value"]
27592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27593    pub servo9_raw: u16,
27594    #[doc = "Servo output 10 value"]
27595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27596    pub servo10_raw: u16,
27597    #[doc = "Servo output 11 value"]
27598    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27599    pub servo11_raw: u16,
27600    #[doc = "Servo output 12 value"]
27601    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27602    pub servo12_raw: u16,
27603    #[doc = "Servo output 13 value"]
27604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27605    pub servo13_raw: u16,
27606    #[doc = "Servo output 14 value"]
27607    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27608    pub servo14_raw: u16,
27609    #[doc = "Servo output 15 value"]
27610    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27611    pub servo15_raw: u16,
27612    #[doc = "Servo output 16 value"]
27613    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27614    pub servo16_raw: u16,
27615}
27616impl SERVO_OUTPUT_RAW_DATA {
27617    pub const ENCODED_LEN: usize = 37usize;
27618    pub const DEFAULT: Self = Self {
27619        time_usec: 0_u32,
27620        servo1_raw: 0_u16,
27621        servo2_raw: 0_u16,
27622        servo3_raw: 0_u16,
27623        servo4_raw: 0_u16,
27624        servo5_raw: 0_u16,
27625        servo6_raw: 0_u16,
27626        servo7_raw: 0_u16,
27627        servo8_raw: 0_u16,
27628        port: 0_u8,
27629        servo9_raw: 0_u16,
27630        servo10_raw: 0_u16,
27631        servo11_raw: 0_u16,
27632        servo12_raw: 0_u16,
27633        servo13_raw: 0_u16,
27634        servo14_raw: 0_u16,
27635        servo15_raw: 0_u16,
27636        servo16_raw: 0_u16,
27637    };
27638    #[cfg(feature = "arbitrary")]
27639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27640        use arbitrary::{Arbitrary, Unstructured};
27641        let mut buf = [0u8; 1024];
27642        rng.fill_bytes(&mut buf);
27643        let mut unstructured = Unstructured::new(&buf);
27644        Self::arbitrary(&mut unstructured).unwrap_or_default()
27645    }
27646}
27647impl Default for SERVO_OUTPUT_RAW_DATA {
27648    fn default() -> Self {
27649        Self::DEFAULT.clone()
27650    }
27651}
27652impl MessageData for SERVO_OUTPUT_RAW_DATA {
27653    type Message = MavMessage;
27654    const ID: u32 = 36u32;
27655    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27656    const EXTRA_CRC: u8 = 222u8;
27657    const ENCODED_LEN: usize = 37usize;
27658    fn deser(
27659        _version: MavlinkVersion,
27660        __input: &[u8],
27661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27662        let avail_len = __input.len();
27663        let mut payload_buf = [0; Self::ENCODED_LEN];
27664        let mut buf = if avail_len < Self::ENCODED_LEN {
27665            payload_buf[0..avail_len].copy_from_slice(__input);
27666            Bytes::new(&payload_buf)
27667        } else {
27668            Bytes::new(__input)
27669        };
27670        let mut __struct = Self::default();
27671        __struct.time_usec = buf.get_u32_le();
27672        __struct.servo1_raw = buf.get_u16_le();
27673        __struct.servo2_raw = buf.get_u16_le();
27674        __struct.servo3_raw = buf.get_u16_le();
27675        __struct.servo4_raw = buf.get_u16_le();
27676        __struct.servo5_raw = buf.get_u16_le();
27677        __struct.servo6_raw = buf.get_u16_le();
27678        __struct.servo7_raw = buf.get_u16_le();
27679        __struct.servo8_raw = buf.get_u16_le();
27680        __struct.port = buf.get_u8();
27681        __struct.servo9_raw = buf.get_u16_le();
27682        __struct.servo10_raw = buf.get_u16_le();
27683        __struct.servo11_raw = buf.get_u16_le();
27684        __struct.servo12_raw = buf.get_u16_le();
27685        __struct.servo13_raw = buf.get_u16_le();
27686        __struct.servo14_raw = buf.get_u16_le();
27687        __struct.servo15_raw = buf.get_u16_le();
27688        __struct.servo16_raw = buf.get_u16_le();
27689        Ok(__struct)
27690    }
27691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27692        let mut __tmp = BytesMut::new(bytes);
27693        #[allow(clippy::absurd_extreme_comparisons)]
27694        #[allow(unused_comparisons)]
27695        if __tmp.remaining() < Self::ENCODED_LEN {
27696            panic!(
27697                "buffer is too small (need {} bytes, but got {})",
27698                Self::ENCODED_LEN,
27699                __tmp.remaining(),
27700            )
27701        }
27702        __tmp.put_u32_le(self.time_usec);
27703        __tmp.put_u16_le(self.servo1_raw);
27704        __tmp.put_u16_le(self.servo2_raw);
27705        __tmp.put_u16_le(self.servo3_raw);
27706        __tmp.put_u16_le(self.servo4_raw);
27707        __tmp.put_u16_le(self.servo5_raw);
27708        __tmp.put_u16_le(self.servo6_raw);
27709        __tmp.put_u16_le(self.servo7_raw);
27710        __tmp.put_u16_le(self.servo8_raw);
27711        __tmp.put_u8(self.port);
27712        if matches!(version, MavlinkVersion::V2) {
27713            __tmp.put_u16_le(self.servo9_raw);
27714            __tmp.put_u16_le(self.servo10_raw);
27715            __tmp.put_u16_le(self.servo11_raw);
27716            __tmp.put_u16_le(self.servo12_raw);
27717            __tmp.put_u16_le(self.servo13_raw);
27718            __tmp.put_u16_le(self.servo14_raw);
27719            __tmp.put_u16_le(self.servo15_raw);
27720            __tmp.put_u16_le(self.servo16_raw);
27721            let len = __tmp.len();
27722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27723        } else {
27724            __tmp.len()
27725        }
27726    }
27727}
27728#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27729#[doc = ""]
27730#[doc = "ID: 256"]
27731#[derive(Debug, Clone, PartialEq)]
27732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27734#[cfg_attr(feature = "ts", derive(TS))]
27735#[cfg_attr(feature = "ts", ts(export))]
27736pub struct SETUP_SIGNING_DATA {
27737    #[doc = "initial timestamp"]
27738    pub initial_timestamp: u64,
27739    #[doc = "system id of the target"]
27740    pub target_system: u8,
27741    #[doc = "component ID of the target"]
27742    pub target_component: u8,
27743    #[doc = "signing key"]
27744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27746    pub secret_key: [u8; 32],
27747}
27748impl SETUP_SIGNING_DATA {
27749    pub const ENCODED_LEN: usize = 42usize;
27750    pub const DEFAULT: Self = Self {
27751        initial_timestamp: 0_u64,
27752        target_system: 0_u8,
27753        target_component: 0_u8,
27754        secret_key: [0_u8; 32usize],
27755    };
27756    #[cfg(feature = "arbitrary")]
27757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27758        use arbitrary::{Arbitrary, Unstructured};
27759        let mut buf = [0u8; 1024];
27760        rng.fill_bytes(&mut buf);
27761        let mut unstructured = Unstructured::new(&buf);
27762        Self::arbitrary(&mut unstructured).unwrap_or_default()
27763    }
27764}
27765impl Default for SETUP_SIGNING_DATA {
27766    fn default() -> Self {
27767        Self::DEFAULT.clone()
27768    }
27769}
27770impl MessageData for SETUP_SIGNING_DATA {
27771    type Message = MavMessage;
27772    const ID: u32 = 256u32;
27773    const NAME: &'static str = "SETUP_SIGNING";
27774    const EXTRA_CRC: u8 = 71u8;
27775    const ENCODED_LEN: usize = 42usize;
27776    fn deser(
27777        _version: MavlinkVersion,
27778        __input: &[u8],
27779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27780        let avail_len = __input.len();
27781        let mut payload_buf = [0; Self::ENCODED_LEN];
27782        let mut buf = if avail_len < Self::ENCODED_LEN {
27783            payload_buf[0..avail_len].copy_from_slice(__input);
27784            Bytes::new(&payload_buf)
27785        } else {
27786            Bytes::new(__input)
27787        };
27788        let mut __struct = Self::default();
27789        __struct.initial_timestamp = buf.get_u64_le();
27790        __struct.target_system = buf.get_u8();
27791        __struct.target_component = buf.get_u8();
27792        for v in &mut __struct.secret_key {
27793            let val = buf.get_u8();
27794            *v = val;
27795        }
27796        Ok(__struct)
27797    }
27798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27799        let mut __tmp = BytesMut::new(bytes);
27800        #[allow(clippy::absurd_extreme_comparisons)]
27801        #[allow(unused_comparisons)]
27802        if __tmp.remaining() < Self::ENCODED_LEN {
27803            panic!(
27804                "buffer is too small (need {} bytes, but got {})",
27805                Self::ENCODED_LEN,
27806                __tmp.remaining(),
27807            )
27808        }
27809        __tmp.put_u64_le(self.initial_timestamp);
27810        __tmp.put_u8(self.target_system);
27811        __tmp.put_u8(self.target_component);
27812        for val in &self.secret_key {
27813            __tmp.put_u8(*val);
27814        }
27815        if matches!(version, MavlinkVersion::V2) {
27816            let len = __tmp.len();
27817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27818        } else {
27819            __tmp.len()
27820        }
27821    }
27822}
27823#[doc = "Set the vehicle attitude and body angular rates."]
27824#[doc = ""]
27825#[doc = "ID: 139"]
27826#[derive(Debug, Clone, PartialEq)]
27827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27829#[cfg_attr(feature = "ts", derive(TS))]
27830#[cfg_attr(feature = "ts", ts(export))]
27831pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27832    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27833    pub time_usec: u64,
27834    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27836    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27837    pub controls: [f32; 8],
27838    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27839    pub group_mlx: u8,
27840    #[doc = "System ID"]
27841    pub target_system: u8,
27842    #[doc = "Component ID"]
27843    pub target_component: u8,
27844}
27845impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27846    pub const ENCODED_LEN: usize = 43usize;
27847    pub const DEFAULT: Self = Self {
27848        time_usec: 0_u64,
27849        controls: [0.0_f32; 8usize],
27850        group_mlx: 0_u8,
27851        target_system: 0_u8,
27852        target_component: 0_u8,
27853    };
27854    #[cfg(feature = "arbitrary")]
27855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27856        use arbitrary::{Arbitrary, Unstructured};
27857        let mut buf = [0u8; 1024];
27858        rng.fill_bytes(&mut buf);
27859        let mut unstructured = Unstructured::new(&buf);
27860        Self::arbitrary(&mut unstructured).unwrap_or_default()
27861    }
27862}
27863impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27864    fn default() -> Self {
27865        Self::DEFAULT.clone()
27866    }
27867}
27868impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27869    type Message = MavMessage;
27870    const ID: u32 = 139u32;
27871    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27872    const EXTRA_CRC: u8 = 168u8;
27873    const ENCODED_LEN: usize = 43usize;
27874    fn deser(
27875        _version: MavlinkVersion,
27876        __input: &[u8],
27877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27878        let avail_len = __input.len();
27879        let mut payload_buf = [0; Self::ENCODED_LEN];
27880        let mut buf = if avail_len < Self::ENCODED_LEN {
27881            payload_buf[0..avail_len].copy_from_slice(__input);
27882            Bytes::new(&payload_buf)
27883        } else {
27884            Bytes::new(__input)
27885        };
27886        let mut __struct = Self::default();
27887        __struct.time_usec = buf.get_u64_le();
27888        for v in &mut __struct.controls {
27889            let val = buf.get_f32_le();
27890            *v = val;
27891        }
27892        __struct.group_mlx = buf.get_u8();
27893        __struct.target_system = buf.get_u8();
27894        __struct.target_component = buf.get_u8();
27895        Ok(__struct)
27896    }
27897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27898        let mut __tmp = BytesMut::new(bytes);
27899        #[allow(clippy::absurd_extreme_comparisons)]
27900        #[allow(unused_comparisons)]
27901        if __tmp.remaining() < Self::ENCODED_LEN {
27902            panic!(
27903                "buffer is too small (need {} bytes, but got {})",
27904                Self::ENCODED_LEN,
27905                __tmp.remaining(),
27906            )
27907        }
27908        __tmp.put_u64_le(self.time_usec);
27909        for val in &self.controls {
27910            __tmp.put_f32_le(*val);
27911        }
27912        __tmp.put_u8(self.group_mlx);
27913        __tmp.put_u8(self.target_system);
27914        __tmp.put_u8(self.target_component);
27915        if matches!(version, MavlinkVersion::V2) {
27916            let len = __tmp.len();
27917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27918        } else {
27919            __tmp.len()
27920        }
27921    }
27922}
27923#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27924#[doc = ""]
27925#[doc = "ID: 82"]
27926#[derive(Debug, Clone, PartialEq)]
27927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27929#[cfg_attr(feature = "ts", derive(TS))]
27930#[cfg_attr(feature = "ts", ts(export))]
27931pub struct SET_ATTITUDE_TARGET_DATA {
27932    #[doc = "Timestamp (time since system boot)."]
27933    pub time_boot_ms: u32,
27934    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27935    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27936    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27937    pub q: [f32; 4],
27938    #[doc = "Body roll rate"]
27939    pub body_roll_rate: f32,
27940    #[doc = "Body pitch rate"]
27941    pub body_pitch_rate: f32,
27942    #[doc = "Body yaw rate"]
27943    pub body_yaw_rate: f32,
27944    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27945    pub thrust: f32,
27946    #[doc = "System ID"]
27947    pub target_system: u8,
27948    #[doc = "Component ID"]
27949    pub target_component: u8,
27950    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27951    pub type_mask: AttitudeTargetTypemask,
27952    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27953    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27956    pub thrust_body: [f32; 3],
27957}
27958impl SET_ATTITUDE_TARGET_DATA {
27959    pub const ENCODED_LEN: usize = 51usize;
27960    pub const DEFAULT: Self = Self {
27961        time_boot_ms: 0_u32,
27962        q: [0.0_f32; 4usize],
27963        body_roll_rate: 0.0_f32,
27964        body_pitch_rate: 0.0_f32,
27965        body_yaw_rate: 0.0_f32,
27966        thrust: 0.0_f32,
27967        target_system: 0_u8,
27968        target_component: 0_u8,
27969        type_mask: AttitudeTargetTypemask::DEFAULT,
27970        thrust_body: [0.0_f32; 3usize],
27971    };
27972    #[cfg(feature = "arbitrary")]
27973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27974        use arbitrary::{Arbitrary, Unstructured};
27975        let mut buf = [0u8; 1024];
27976        rng.fill_bytes(&mut buf);
27977        let mut unstructured = Unstructured::new(&buf);
27978        Self::arbitrary(&mut unstructured).unwrap_or_default()
27979    }
27980}
27981impl Default for SET_ATTITUDE_TARGET_DATA {
27982    fn default() -> Self {
27983        Self::DEFAULT.clone()
27984    }
27985}
27986impl MessageData for SET_ATTITUDE_TARGET_DATA {
27987    type Message = MavMessage;
27988    const ID: u32 = 82u32;
27989    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27990    const EXTRA_CRC: u8 = 49u8;
27991    const ENCODED_LEN: usize = 51usize;
27992    fn deser(
27993        _version: MavlinkVersion,
27994        __input: &[u8],
27995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27996        let avail_len = __input.len();
27997        let mut payload_buf = [0; Self::ENCODED_LEN];
27998        let mut buf = if avail_len < Self::ENCODED_LEN {
27999            payload_buf[0..avail_len].copy_from_slice(__input);
28000            Bytes::new(&payload_buf)
28001        } else {
28002            Bytes::new(__input)
28003        };
28004        let mut __struct = Self::default();
28005        __struct.time_boot_ms = buf.get_u32_le();
28006        for v in &mut __struct.q {
28007            let val = buf.get_f32_le();
28008            *v = val;
28009        }
28010        __struct.body_roll_rate = buf.get_f32_le();
28011        __struct.body_pitch_rate = buf.get_f32_le();
28012        __struct.body_yaw_rate = buf.get_f32_le();
28013        __struct.thrust = buf.get_f32_le();
28014        __struct.target_system = buf.get_u8();
28015        __struct.target_component = buf.get_u8();
28016        let tmp = buf.get_u8();
28017        __struct.type_mask = AttitudeTargetTypemask::from_bits(
28018            tmp & AttitudeTargetTypemask::all().bits(),
28019        )
28020        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28021            flag_type: "AttitudeTargetTypemask",
28022            value: tmp as u32,
28023        })?;
28024        for v in &mut __struct.thrust_body {
28025            let val = buf.get_f32_le();
28026            *v = val;
28027        }
28028        Ok(__struct)
28029    }
28030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28031        let mut __tmp = BytesMut::new(bytes);
28032        #[allow(clippy::absurd_extreme_comparisons)]
28033        #[allow(unused_comparisons)]
28034        if __tmp.remaining() < Self::ENCODED_LEN {
28035            panic!(
28036                "buffer is too small (need {} bytes, but got {})",
28037                Self::ENCODED_LEN,
28038                __tmp.remaining(),
28039            )
28040        }
28041        __tmp.put_u32_le(self.time_boot_ms);
28042        for val in &self.q {
28043            __tmp.put_f32_le(*val);
28044        }
28045        __tmp.put_f32_le(self.body_roll_rate);
28046        __tmp.put_f32_le(self.body_pitch_rate);
28047        __tmp.put_f32_le(self.body_yaw_rate);
28048        __tmp.put_f32_le(self.thrust);
28049        __tmp.put_u8(self.target_system);
28050        __tmp.put_u8(self.target_component);
28051        __tmp.put_u8(self.type_mask.bits());
28052        if matches!(version, MavlinkVersion::V2) {
28053            for val in &self.thrust_body {
28054                __tmp.put_f32_le(*val);
28055            }
28056            let len = __tmp.len();
28057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28058        } else {
28059            __tmp.len()
28060        }
28061    }
28062}
28063#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28064#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28065#[doc = ""]
28066#[doc = "ID: 48"]
28067#[derive(Debug, Clone, PartialEq)]
28068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28070#[cfg_attr(feature = "ts", derive(TS))]
28071#[cfg_attr(feature = "ts", ts(export))]
28072pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28073    #[doc = "Latitude (WGS84)"]
28074    pub latitude: i32,
28075    #[doc = "Longitude (WGS84)"]
28076    pub longitude: i32,
28077    #[doc = "Altitude (MSL). Positive for up."]
28078    pub altitude: i32,
28079    #[doc = "System ID"]
28080    pub target_system: u8,
28081    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28082    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28083    pub time_usec: u64,
28084}
28085impl SET_GPS_GLOBAL_ORIGIN_DATA {
28086    pub const ENCODED_LEN: usize = 21usize;
28087    pub const DEFAULT: Self = Self {
28088        latitude: 0_i32,
28089        longitude: 0_i32,
28090        altitude: 0_i32,
28091        target_system: 0_u8,
28092        time_usec: 0_u64,
28093    };
28094    #[cfg(feature = "arbitrary")]
28095    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28096        use arbitrary::{Arbitrary, Unstructured};
28097        let mut buf = [0u8; 1024];
28098        rng.fill_bytes(&mut buf);
28099        let mut unstructured = Unstructured::new(&buf);
28100        Self::arbitrary(&mut unstructured).unwrap_or_default()
28101    }
28102}
28103impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28104    fn default() -> Self {
28105        Self::DEFAULT.clone()
28106    }
28107}
28108impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28109    type Message = MavMessage;
28110    const ID: u32 = 48u32;
28111    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28112    const EXTRA_CRC: u8 = 41u8;
28113    const ENCODED_LEN: usize = 21usize;
28114    fn deser(
28115        _version: MavlinkVersion,
28116        __input: &[u8],
28117    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28118        let avail_len = __input.len();
28119        let mut payload_buf = [0; Self::ENCODED_LEN];
28120        let mut buf = if avail_len < Self::ENCODED_LEN {
28121            payload_buf[0..avail_len].copy_from_slice(__input);
28122            Bytes::new(&payload_buf)
28123        } else {
28124            Bytes::new(__input)
28125        };
28126        let mut __struct = Self::default();
28127        __struct.latitude = buf.get_i32_le();
28128        __struct.longitude = buf.get_i32_le();
28129        __struct.altitude = buf.get_i32_le();
28130        __struct.target_system = buf.get_u8();
28131        __struct.time_usec = buf.get_u64_le();
28132        Ok(__struct)
28133    }
28134    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28135        let mut __tmp = BytesMut::new(bytes);
28136        #[allow(clippy::absurd_extreme_comparisons)]
28137        #[allow(unused_comparisons)]
28138        if __tmp.remaining() < Self::ENCODED_LEN {
28139            panic!(
28140                "buffer is too small (need {} bytes, but got {})",
28141                Self::ENCODED_LEN,
28142                __tmp.remaining(),
28143            )
28144        }
28145        __tmp.put_i32_le(self.latitude);
28146        __tmp.put_i32_le(self.longitude);
28147        __tmp.put_i32_le(self.altitude);
28148        __tmp.put_u8(self.target_system);
28149        if matches!(version, MavlinkVersion::V2) {
28150            __tmp.put_u64_le(self.time_usec);
28151            let len = __tmp.len();
28152            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28153        } else {
28154            __tmp.len()
28155        }
28156    }
28157}
28158#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28159#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28160#[doc = ""]
28161#[doc = "ID: 243"]
28162#[derive(Debug, Clone, PartialEq)]
28163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28165#[cfg_attr(feature = "ts", derive(TS))]
28166#[cfg_attr(feature = "ts", ts(export))]
28167pub struct SET_HOME_POSITION_DATA {
28168    #[doc = "Latitude (WGS84)"]
28169    pub latitude: i32,
28170    #[doc = "Longitude (WGS84)"]
28171    pub longitude: i32,
28172    #[doc = "Altitude (MSL). Positive for up."]
28173    pub altitude: i32,
28174    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28175    pub x: f32,
28176    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28177    pub y: f32,
28178    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28179    pub z: f32,
28180    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28183    pub q: [f32; 4],
28184    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28185    pub approach_x: f32,
28186    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28187    pub approach_y: f32,
28188    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28189    pub approach_z: f32,
28190    #[doc = "System ID."]
28191    pub target_system: u8,
28192    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28193    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28194    pub time_usec: u64,
28195}
28196impl SET_HOME_POSITION_DATA {
28197    pub const ENCODED_LEN: usize = 61usize;
28198    pub const DEFAULT: Self = Self {
28199        latitude: 0_i32,
28200        longitude: 0_i32,
28201        altitude: 0_i32,
28202        x: 0.0_f32,
28203        y: 0.0_f32,
28204        z: 0.0_f32,
28205        q: [0.0_f32; 4usize],
28206        approach_x: 0.0_f32,
28207        approach_y: 0.0_f32,
28208        approach_z: 0.0_f32,
28209        target_system: 0_u8,
28210        time_usec: 0_u64,
28211    };
28212    #[cfg(feature = "arbitrary")]
28213    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28214        use arbitrary::{Arbitrary, Unstructured};
28215        let mut buf = [0u8; 1024];
28216        rng.fill_bytes(&mut buf);
28217        let mut unstructured = Unstructured::new(&buf);
28218        Self::arbitrary(&mut unstructured).unwrap_or_default()
28219    }
28220}
28221impl Default for SET_HOME_POSITION_DATA {
28222    fn default() -> Self {
28223        Self::DEFAULT.clone()
28224    }
28225}
28226impl MessageData for SET_HOME_POSITION_DATA {
28227    type Message = MavMessage;
28228    const ID: u32 = 243u32;
28229    const NAME: &'static str = "SET_HOME_POSITION";
28230    const EXTRA_CRC: u8 = 85u8;
28231    const ENCODED_LEN: usize = 61usize;
28232    fn deser(
28233        _version: MavlinkVersion,
28234        __input: &[u8],
28235    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28236        let avail_len = __input.len();
28237        let mut payload_buf = [0; Self::ENCODED_LEN];
28238        let mut buf = if avail_len < Self::ENCODED_LEN {
28239            payload_buf[0..avail_len].copy_from_slice(__input);
28240            Bytes::new(&payload_buf)
28241        } else {
28242            Bytes::new(__input)
28243        };
28244        let mut __struct = Self::default();
28245        __struct.latitude = buf.get_i32_le();
28246        __struct.longitude = buf.get_i32_le();
28247        __struct.altitude = buf.get_i32_le();
28248        __struct.x = buf.get_f32_le();
28249        __struct.y = buf.get_f32_le();
28250        __struct.z = buf.get_f32_le();
28251        for v in &mut __struct.q {
28252            let val = buf.get_f32_le();
28253            *v = val;
28254        }
28255        __struct.approach_x = buf.get_f32_le();
28256        __struct.approach_y = buf.get_f32_le();
28257        __struct.approach_z = buf.get_f32_le();
28258        __struct.target_system = buf.get_u8();
28259        __struct.time_usec = buf.get_u64_le();
28260        Ok(__struct)
28261    }
28262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28263        let mut __tmp = BytesMut::new(bytes);
28264        #[allow(clippy::absurd_extreme_comparisons)]
28265        #[allow(unused_comparisons)]
28266        if __tmp.remaining() < Self::ENCODED_LEN {
28267            panic!(
28268                "buffer is too small (need {} bytes, but got {})",
28269                Self::ENCODED_LEN,
28270                __tmp.remaining(),
28271            )
28272        }
28273        __tmp.put_i32_le(self.latitude);
28274        __tmp.put_i32_le(self.longitude);
28275        __tmp.put_i32_le(self.altitude);
28276        __tmp.put_f32_le(self.x);
28277        __tmp.put_f32_le(self.y);
28278        __tmp.put_f32_le(self.z);
28279        for val in &self.q {
28280            __tmp.put_f32_le(*val);
28281        }
28282        __tmp.put_f32_le(self.approach_x);
28283        __tmp.put_f32_le(self.approach_y);
28284        __tmp.put_f32_le(self.approach_z);
28285        __tmp.put_u8(self.target_system);
28286        if matches!(version, MavlinkVersion::V2) {
28287            __tmp.put_u64_le(self.time_usec);
28288            let len = __tmp.len();
28289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28290        } else {
28291            __tmp.len()
28292        }
28293    }
28294}
28295#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28296#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28297#[doc = ""]
28298#[doc = "ID: 11"]
28299#[derive(Debug, Clone, PartialEq)]
28300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28302#[cfg_attr(feature = "ts", derive(TS))]
28303#[cfg_attr(feature = "ts", ts(export))]
28304pub struct SET_MODE_DATA {
28305    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28306    pub custom_mode: u32,
28307    #[doc = "The system setting the mode"]
28308    pub target_system: u8,
28309    #[doc = "The new base mode."]
28310    pub base_mode: MavMode,
28311}
28312impl SET_MODE_DATA {
28313    pub const ENCODED_LEN: usize = 6usize;
28314    pub const DEFAULT: Self = Self {
28315        custom_mode: 0_u32,
28316        target_system: 0_u8,
28317        base_mode: MavMode::DEFAULT,
28318    };
28319    #[cfg(feature = "arbitrary")]
28320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28321        use arbitrary::{Arbitrary, Unstructured};
28322        let mut buf = [0u8; 1024];
28323        rng.fill_bytes(&mut buf);
28324        let mut unstructured = Unstructured::new(&buf);
28325        Self::arbitrary(&mut unstructured).unwrap_or_default()
28326    }
28327}
28328impl Default for SET_MODE_DATA {
28329    fn default() -> Self {
28330        Self::DEFAULT.clone()
28331    }
28332}
28333impl MessageData for SET_MODE_DATA {
28334    type Message = MavMessage;
28335    const ID: u32 = 11u32;
28336    const NAME: &'static str = "SET_MODE";
28337    const EXTRA_CRC: u8 = 89u8;
28338    const ENCODED_LEN: usize = 6usize;
28339    fn deser(
28340        _version: MavlinkVersion,
28341        __input: &[u8],
28342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28343        let avail_len = __input.len();
28344        let mut payload_buf = [0; Self::ENCODED_LEN];
28345        let mut buf = if avail_len < Self::ENCODED_LEN {
28346            payload_buf[0..avail_len].copy_from_slice(__input);
28347            Bytes::new(&payload_buf)
28348        } else {
28349            Bytes::new(__input)
28350        };
28351        let mut __struct = Self::default();
28352        __struct.custom_mode = buf.get_u32_le();
28353        __struct.target_system = buf.get_u8();
28354        let tmp = buf.get_u8();
28355        __struct.base_mode =
28356            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28357                enum_type: "MavMode",
28358                value: tmp as u32,
28359            })?;
28360        Ok(__struct)
28361    }
28362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28363        let mut __tmp = BytesMut::new(bytes);
28364        #[allow(clippy::absurd_extreme_comparisons)]
28365        #[allow(unused_comparisons)]
28366        if __tmp.remaining() < Self::ENCODED_LEN {
28367            panic!(
28368                "buffer is too small (need {} bytes, but got {})",
28369                Self::ENCODED_LEN,
28370                __tmp.remaining(),
28371            )
28372        }
28373        __tmp.put_u32_le(self.custom_mode);
28374        __tmp.put_u8(self.target_system);
28375        __tmp.put_u8(self.base_mode as u8);
28376        if matches!(version, MavlinkVersion::V2) {
28377            let len = __tmp.len();
28378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28379        } else {
28380            __tmp.len()
28381        }
28382    }
28383}
28384#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28385#[doc = ""]
28386#[doc = "ID: 86"]
28387#[derive(Debug, Clone, PartialEq)]
28388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28390#[cfg_attr(feature = "ts", derive(TS))]
28391#[cfg_attr(feature = "ts", ts(export))]
28392pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28393    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28394    pub time_boot_ms: u32,
28395    #[doc = "Latitude in WGS84 frame"]
28396    pub lat_int: i32,
28397    #[doc = "Longitude in WGS84 frame"]
28398    pub lon_int: i32,
28399    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28400    pub alt: f32,
28401    #[doc = "X velocity in NED frame"]
28402    pub vx: f32,
28403    #[doc = "Y velocity in NED frame"]
28404    pub vy: f32,
28405    #[doc = "Z velocity in NED frame"]
28406    pub vz: f32,
28407    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28408    pub afx: f32,
28409    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28410    pub afy: f32,
28411    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28412    pub afz: f32,
28413    #[doc = "yaw setpoint"]
28414    pub yaw: f32,
28415    #[doc = "yaw rate setpoint"]
28416    pub yaw_rate: f32,
28417    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28418    pub type_mask: PositionTargetTypemask,
28419    #[doc = "System ID"]
28420    pub target_system: u8,
28421    #[doc = "Component ID"]
28422    pub target_component: u8,
28423    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28424    pub coordinate_frame: MavFrame,
28425}
28426impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28427    pub const ENCODED_LEN: usize = 53usize;
28428    pub const DEFAULT: Self = Self {
28429        time_boot_ms: 0_u32,
28430        lat_int: 0_i32,
28431        lon_int: 0_i32,
28432        alt: 0.0_f32,
28433        vx: 0.0_f32,
28434        vy: 0.0_f32,
28435        vz: 0.0_f32,
28436        afx: 0.0_f32,
28437        afy: 0.0_f32,
28438        afz: 0.0_f32,
28439        yaw: 0.0_f32,
28440        yaw_rate: 0.0_f32,
28441        type_mask: PositionTargetTypemask::DEFAULT,
28442        target_system: 0_u8,
28443        target_component: 0_u8,
28444        coordinate_frame: MavFrame::DEFAULT,
28445    };
28446    #[cfg(feature = "arbitrary")]
28447    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28448        use arbitrary::{Arbitrary, Unstructured};
28449        let mut buf = [0u8; 1024];
28450        rng.fill_bytes(&mut buf);
28451        let mut unstructured = Unstructured::new(&buf);
28452        Self::arbitrary(&mut unstructured).unwrap_or_default()
28453    }
28454}
28455impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28456    fn default() -> Self {
28457        Self::DEFAULT.clone()
28458    }
28459}
28460impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28461    type Message = MavMessage;
28462    const ID: u32 = 86u32;
28463    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28464    const EXTRA_CRC: u8 = 5u8;
28465    const ENCODED_LEN: usize = 53usize;
28466    fn deser(
28467        _version: MavlinkVersion,
28468        __input: &[u8],
28469    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28470        let avail_len = __input.len();
28471        let mut payload_buf = [0; Self::ENCODED_LEN];
28472        let mut buf = if avail_len < Self::ENCODED_LEN {
28473            payload_buf[0..avail_len].copy_from_slice(__input);
28474            Bytes::new(&payload_buf)
28475        } else {
28476            Bytes::new(__input)
28477        };
28478        let mut __struct = Self::default();
28479        __struct.time_boot_ms = buf.get_u32_le();
28480        __struct.lat_int = buf.get_i32_le();
28481        __struct.lon_int = buf.get_i32_le();
28482        __struct.alt = buf.get_f32_le();
28483        __struct.vx = buf.get_f32_le();
28484        __struct.vy = buf.get_f32_le();
28485        __struct.vz = buf.get_f32_le();
28486        __struct.afx = buf.get_f32_le();
28487        __struct.afy = buf.get_f32_le();
28488        __struct.afz = buf.get_f32_le();
28489        __struct.yaw = buf.get_f32_le();
28490        __struct.yaw_rate = buf.get_f32_le();
28491        let tmp = buf.get_u16_le();
28492        __struct.type_mask = PositionTargetTypemask::from_bits(
28493            tmp & PositionTargetTypemask::all().bits(),
28494        )
28495        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28496            flag_type: "PositionTargetTypemask",
28497            value: tmp as u32,
28498        })?;
28499        __struct.target_system = buf.get_u8();
28500        __struct.target_component = buf.get_u8();
28501        let tmp = buf.get_u8();
28502        __struct.coordinate_frame =
28503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28504                enum_type: "MavFrame",
28505                value: tmp as u32,
28506            })?;
28507        Ok(__struct)
28508    }
28509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28510        let mut __tmp = BytesMut::new(bytes);
28511        #[allow(clippy::absurd_extreme_comparisons)]
28512        #[allow(unused_comparisons)]
28513        if __tmp.remaining() < Self::ENCODED_LEN {
28514            panic!(
28515                "buffer is too small (need {} bytes, but got {})",
28516                Self::ENCODED_LEN,
28517                __tmp.remaining(),
28518            )
28519        }
28520        __tmp.put_u32_le(self.time_boot_ms);
28521        __tmp.put_i32_le(self.lat_int);
28522        __tmp.put_i32_le(self.lon_int);
28523        __tmp.put_f32_le(self.alt);
28524        __tmp.put_f32_le(self.vx);
28525        __tmp.put_f32_le(self.vy);
28526        __tmp.put_f32_le(self.vz);
28527        __tmp.put_f32_le(self.afx);
28528        __tmp.put_f32_le(self.afy);
28529        __tmp.put_f32_le(self.afz);
28530        __tmp.put_f32_le(self.yaw);
28531        __tmp.put_f32_le(self.yaw_rate);
28532        __tmp.put_u16_le(self.type_mask.bits());
28533        __tmp.put_u8(self.target_system);
28534        __tmp.put_u8(self.target_component);
28535        __tmp.put_u8(self.coordinate_frame as u8);
28536        if matches!(version, MavlinkVersion::V2) {
28537            let len = __tmp.len();
28538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28539        } else {
28540            __tmp.len()
28541        }
28542    }
28543}
28544#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28545#[doc = ""]
28546#[doc = "ID: 84"]
28547#[derive(Debug, Clone, PartialEq)]
28548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28550#[cfg_attr(feature = "ts", derive(TS))]
28551#[cfg_attr(feature = "ts", ts(export))]
28552pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28553    #[doc = "Timestamp (time since system boot)."]
28554    pub time_boot_ms: u32,
28555    #[doc = "X Position in NED frame"]
28556    pub x: f32,
28557    #[doc = "Y Position in NED frame"]
28558    pub y: f32,
28559    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28560    pub z: f32,
28561    #[doc = "X velocity in NED frame"]
28562    pub vx: f32,
28563    #[doc = "Y velocity in NED frame"]
28564    pub vy: f32,
28565    #[doc = "Z velocity in NED frame"]
28566    pub vz: f32,
28567    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28568    pub afx: f32,
28569    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28570    pub afy: f32,
28571    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28572    pub afz: f32,
28573    #[doc = "yaw setpoint"]
28574    pub yaw: f32,
28575    #[doc = "yaw rate setpoint"]
28576    pub yaw_rate: f32,
28577    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28578    pub type_mask: PositionTargetTypemask,
28579    #[doc = "System ID"]
28580    pub target_system: u8,
28581    #[doc = "Component ID"]
28582    pub target_component: u8,
28583    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28584    pub coordinate_frame: MavFrame,
28585}
28586impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28587    pub const ENCODED_LEN: usize = 53usize;
28588    pub const DEFAULT: Self = Self {
28589        time_boot_ms: 0_u32,
28590        x: 0.0_f32,
28591        y: 0.0_f32,
28592        z: 0.0_f32,
28593        vx: 0.0_f32,
28594        vy: 0.0_f32,
28595        vz: 0.0_f32,
28596        afx: 0.0_f32,
28597        afy: 0.0_f32,
28598        afz: 0.0_f32,
28599        yaw: 0.0_f32,
28600        yaw_rate: 0.0_f32,
28601        type_mask: PositionTargetTypemask::DEFAULT,
28602        target_system: 0_u8,
28603        target_component: 0_u8,
28604        coordinate_frame: MavFrame::DEFAULT,
28605    };
28606    #[cfg(feature = "arbitrary")]
28607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28608        use arbitrary::{Arbitrary, Unstructured};
28609        let mut buf = [0u8; 1024];
28610        rng.fill_bytes(&mut buf);
28611        let mut unstructured = Unstructured::new(&buf);
28612        Self::arbitrary(&mut unstructured).unwrap_or_default()
28613    }
28614}
28615impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28616    fn default() -> Self {
28617        Self::DEFAULT.clone()
28618    }
28619}
28620impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28621    type Message = MavMessage;
28622    const ID: u32 = 84u32;
28623    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28624    const EXTRA_CRC: u8 = 143u8;
28625    const ENCODED_LEN: usize = 53usize;
28626    fn deser(
28627        _version: MavlinkVersion,
28628        __input: &[u8],
28629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28630        let avail_len = __input.len();
28631        let mut payload_buf = [0; Self::ENCODED_LEN];
28632        let mut buf = if avail_len < Self::ENCODED_LEN {
28633            payload_buf[0..avail_len].copy_from_slice(__input);
28634            Bytes::new(&payload_buf)
28635        } else {
28636            Bytes::new(__input)
28637        };
28638        let mut __struct = Self::default();
28639        __struct.time_boot_ms = buf.get_u32_le();
28640        __struct.x = buf.get_f32_le();
28641        __struct.y = buf.get_f32_le();
28642        __struct.z = buf.get_f32_le();
28643        __struct.vx = buf.get_f32_le();
28644        __struct.vy = buf.get_f32_le();
28645        __struct.vz = buf.get_f32_le();
28646        __struct.afx = buf.get_f32_le();
28647        __struct.afy = buf.get_f32_le();
28648        __struct.afz = buf.get_f32_le();
28649        __struct.yaw = buf.get_f32_le();
28650        __struct.yaw_rate = buf.get_f32_le();
28651        let tmp = buf.get_u16_le();
28652        __struct.type_mask = PositionTargetTypemask::from_bits(
28653            tmp & PositionTargetTypemask::all().bits(),
28654        )
28655        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28656            flag_type: "PositionTargetTypemask",
28657            value: tmp as u32,
28658        })?;
28659        __struct.target_system = buf.get_u8();
28660        __struct.target_component = buf.get_u8();
28661        let tmp = buf.get_u8();
28662        __struct.coordinate_frame =
28663            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28664                enum_type: "MavFrame",
28665                value: tmp as u32,
28666            })?;
28667        Ok(__struct)
28668    }
28669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28670        let mut __tmp = BytesMut::new(bytes);
28671        #[allow(clippy::absurd_extreme_comparisons)]
28672        #[allow(unused_comparisons)]
28673        if __tmp.remaining() < Self::ENCODED_LEN {
28674            panic!(
28675                "buffer is too small (need {} bytes, but got {})",
28676                Self::ENCODED_LEN,
28677                __tmp.remaining(),
28678            )
28679        }
28680        __tmp.put_u32_le(self.time_boot_ms);
28681        __tmp.put_f32_le(self.x);
28682        __tmp.put_f32_le(self.y);
28683        __tmp.put_f32_le(self.z);
28684        __tmp.put_f32_le(self.vx);
28685        __tmp.put_f32_le(self.vy);
28686        __tmp.put_f32_le(self.vz);
28687        __tmp.put_f32_le(self.afx);
28688        __tmp.put_f32_le(self.afy);
28689        __tmp.put_f32_le(self.afz);
28690        __tmp.put_f32_le(self.yaw);
28691        __tmp.put_f32_le(self.yaw_rate);
28692        __tmp.put_u16_le(self.type_mask.bits());
28693        __tmp.put_u8(self.target_system);
28694        __tmp.put_u8(self.target_component);
28695        __tmp.put_u8(self.coordinate_frame as u8);
28696        if matches!(version, MavlinkVersion::V2) {
28697            let len = __tmp.len();
28698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28699        } else {
28700            __tmp.len()
28701        }
28702    }
28703}
28704#[doc = "Status of simulation environment, if used."]
28705#[doc = ""]
28706#[doc = "ID: 108"]
28707#[derive(Debug, Clone, PartialEq)]
28708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28710#[cfg_attr(feature = "ts", derive(TS))]
28711#[cfg_attr(feature = "ts", ts(export))]
28712pub struct SIM_STATE_DATA {
28713    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28714    pub q1: f32,
28715    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28716    pub q2: f32,
28717    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28718    pub q3: f32,
28719    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28720    pub q4: f32,
28721    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28722    pub roll: f32,
28723    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28724    pub pitch: f32,
28725    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28726    pub yaw: f32,
28727    #[doc = "X acceleration"]
28728    pub xacc: f32,
28729    #[doc = "Y acceleration"]
28730    pub yacc: f32,
28731    #[doc = "Z acceleration"]
28732    pub zacc: f32,
28733    #[doc = "Angular speed around X axis"]
28734    pub xgyro: f32,
28735    #[doc = "Angular speed around Y axis"]
28736    pub ygyro: f32,
28737    #[doc = "Angular speed around Z axis"]
28738    pub zgyro: f32,
28739    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28740    pub lat: f32,
28741    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28742    pub lon: f32,
28743    #[doc = "Altitude"]
28744    pub alt: f32,
28745    #[doc = "Horizontal position standard deviation"]
28746    pub std_dev_horz: f32,
28747    #[doc = "Vertical position standard deviation"]
28748    pub std_dev_vert: f32,
28749    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28750    pub vn: f32,
28751    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28752    pub ve: f32,
28753    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28754    pub vd: f32,
28755    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28756    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28757    pub lat_int: i32,
28758    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28760    pub lon_int: i32,
28761}
28762impl SIM_STATE_DATA {
28763    pub const ENCODED_LEN: usize = 92usize;
28764    pub const DEFAULT: Self = Self {
28765        q1: 0.0_f32,
28766        q2: 0.0_f32,
28767        q3: 0.0_f32,
28768        q4: 0.0_f32,
28769        roll: 0.0_f32,
28770        pitch: 0.0_f32,
28771        yaw: 0.0_f32,
28772        xacc: 0.0_f32,
28773        yacc: 0.0_f32,
28774        zacc: 0.0_f32,
28775        xgyro: 0.0_f32,
28776        ygyro: 0.0_f32,
28777        zgyro: 0.0_f32,
28778        lat: 0.0_f32,
28779        lon: 0.0_f32,
28780        alt: 0.0_f32,
28781        std_dev_horz: 0.0_f32,
28782        std_dev_vert: 0.0_f32,
28783        vn: 0.0_f32,
28784        ve: 0.0_f32,
28785        vd: 0.0_f32,
28786        lat_int: 0_i32,
28787        lon_int: 0_i32,
28788    };
28789    #[cfg(feature = "arbitrary")]
28790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28791        use arbitrary::{Arbitrary, Unstructured};
28792        let mut buf = [0u8; 1024];
28793        rng.fill_bytes(&mut buf);
28794        let mut unstructured = Unstructured::new(&buf);
28795        Self::arbitrary(&mut unstructured).unwrap_or_default()
28796    }
28797}
28798impl Default for SIM_STATE_DATA {
28799    fn default() -> Self {
28800        Self::DEFAULT.clone()
28801    }
28802}
28803impl MessageData for SIM_STATE_DATA {
28804    type Message = MavMessage;
28805    const ID: u32 = 108u32;
28806    const NAME: &'static str = "SIM_STATE";
28807    const EXTRA_CRC: u8 = 32u8;
28808    const ENCODED_LEN: usize = 92usize;
28809    fn deser(
28810        _version: MavlinkVersion,
28811        __input: &[u8],
28812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28813        let avail_len = __input.len();
28814        let mut payload_buf = [0; Self::ENCODED_LEN];
28815        let mut buf = if avail_len < Self::ENCODED_LEN {
28816            payload_buf[0..avail_len].copy_from_slice(__input);
28817            Bytes::new(&payload_buf)
28818        } else {
28819            Bytes::new(__input)
28820        };
28821        let mut __struct = Self::default();
28822        __struct.q1 = buf.get_f32_le();
28823        __struct.q2 = buf.get_f32_le();
28824        __struct.q3 = buf.get_f32_le();
28825        __struct.q4 = buf.get_f32_le();
28826        __struct.roll = buf.get_f32_le();
28827        __struct.pitch = buf.get_f32_le();
28828        __struct.yaw = buf.get_f32_le();
28829        __struct.xacc = buf.get_f32_le();
28830        __struct.yacc = buf.get_f32_le();
28831        __struct.zacc = buf.get_f32_le();
28832        __struct.xgyro = buf.get_f32_le();
28833        __struct.ygyro = buf.get_f32_le();
28834        __struct.zgyro = buf.get_f32_le();
28835        __struct.lat = buf.get_f32_le();
28836        __struct.lon = buf.get_f32_le();
28837        __struct.alt = buf.get_f32_le();
28838        __struct.std_dev_horz = buf.get_f32_le();
28839        __struct.std_dev_vert = buf.get_f32_le();
28840        __struct.vn = buf.get_f32_le();
28841        __struct.ve = buf.get_f32_le();
28842        __struct.vd = buf.get_f32_le();
28843        __struct.lat_int = buf.get_i32_le();
28844        __struct.lon_int = buf.get_i32_le();
28845        Ok(__struct)
28846    }
28847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28848        let mut __tmp = BytesMut::new(bytes);
28849        #[allow(clippy::absurd_extreme_comparisons)]
28850        #[allow(unused_comparisons)]
28851        if __tmp.remaining() < Self::ENCODED_LEN {
28852            panic!(
28853                "buffer is too small (need {} bytes, but got {})",
28854                Self::ENCODED_LEN,
28855                __tmp.remaining(),
28856            )
28857        }
28858        __tmp.put_f32_le(self.q1);
28859        __tmp.put_f32_le(self.q2);
28860        __tmp.put_f32_le(self.q3);
28861        __tmp.put_f32_le(self.q4);
28862        __tmp.put_f32_le(self.roll);
28863        __tmp.put_f32_le(self.pitch);
28864        __tmp.put_f32_le(self.yaw);
28865        __tmp.put_f32_le(self.xacc);
28866        __tmp.put_f32_le(self.yacc);
28867        __tmp.put_f32_le(self.zacc);
28868        __tmp.put_f32_le(self.xgyro);
28869        __tmp.put_f32_le(self.ygyro);
28870        __tmp.put_f32_le(self.zgyro);
28871        __tmp.put_f32_le(self.lat);
28872        __tmp.put_f32_le(self.lon);
28873        __tmp.put_f32_le(self.alt);
28874        __tmp.put_f32_le(self.std_dev_horz);
28875        __tmp.put_f32_le(self.std_dev_vert);
28876        __tmp.put_f32_le(self.vn);
28877        __tmp.put_f32_le(self.ve);
28878        __tmp.put_f32_le(self.vd);
28879        if matches!(version, MavlinkVersion::V2) {
28880            __tmp.put_i32_le(self.lat_int);
28881            __tmp.put_i32_le(self.lon_int);
28882            let len = __tmp.len();
28883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28884        } else {
28885            __tmp.len()
28886        }
28887    }
28888}
28889#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28890#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28891#[doc = ""]
28892#[doc = "ID: 370"]
28893#[derive(Debug, Clone, PartialEq)]
28894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28896#[cfg_attr(feature = "ts", derive(TS))]
28897#[cfg_attr(feature = "ts", ts(export))]
28898pub struct SMART_BATTERY_INFO_DATA {
28899    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28900    pub capacity_full_specification: i32,
28901    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28902    pub capacity_full: i32,
28903    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28904    pub cycle_count: u16,
28905    #[doc = "Battery weight. 0: field not provided."]
28906    pub weight: u16,
28907    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28908    pub discharge_minimum_voltage: u16,
28909    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28910    pub charging_minimum_voltage: u16,
28911    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28912    pub resting_minimum_voltage: u16,
28913    #[doc = "Battery ID"]
28914    pub id: u8,
28915    #[doc = "Function of the battery"]
28916    pub battery_function: MavBatteryFunction,
28917    #[doc = "Type (chemistry) of the battery"]
28918    pub mavtype: MavBatteryType,
28919    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28921    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28922    pub serial_number: [u8; 16],
28923    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28926    pub device_name: [u8; 50],
28927    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28929    pub charging_maximum_voltage: u16,
28930    #[doc = "Number of battery cells in series. 0: field not provided."]
28931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28932    pub cells_in_series: u8,
28933    #[doc = "Maximum pack discharge current. 0: field not provided."]
28934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28935    pub discharge_maximum_current: u32,
28936    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28937    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28938    pub discharge_maximum_burst_current: u32,
28939    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28940    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28941    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28942    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28943    pub manufacture_date: [u8; 11],
28944}
28945impl SMART_BATTERY_INFO_DATA {
28946    pub const ENCODED_LEN: usize = 109usize;
28947    pub const DEFAULT: Self = Self {
28948        capacity_full_specification: 0_i32,
28949        capacity_full: 0_i32,
28950        cycle_count: 0_u16,
28951        weight: 0_u16,
28952        discharge_minimum_voltage: 0_u16,
28953        charging_minimum_voltage: 0_u16,
28954        resting_minimum_voltage: 0_u16,
28955        id: 0_u8,
28956        battery_function: MavBatteryFunction::DEFAULT,
28957        mavtype: MavBatteryType::DEFAULT,
28958        serial_number: [0_u8; 16usize],
28959        device_name: [0_u8; 50usize],
28960        charging_maximum_voltage: 0_u16,
28961        cells_in_series: 0_u8,
28962        discharge_maximum_current: 0_u32,
28963        discharge_maximum_burst_current: 0_u32,
28964        manufacture_date: [0_u8; 11usize],
28965    };
28966    #[cfg(feature = "arbitrary")]
28967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28968        use arbitrary::{Arbitrary, Unstructured};
28969        let mut buf = [0u8; 1024];
28970        rng.fill_bytes(&mut buf);
28971        let mut unstructured = Unstructured::new(&buf);
28972        Self::arbitrary(&mut unstructured).unwrap_or_default()
28973    }
28974}
28975impl Default for SMART_BATTERY_INFO_DATA {
28976    fn default() -> Self {
28977        Self::DEFAULT.clone()
28978    }
28979}
28980impl MessageData for SMART_BATTERY_INFO_DATA {
28981    type Message = MavMessage;
28982    const ID: u32 = 370u32;
28983    const NAME: &'static str = "SMART_BATTERY_INFO";
28984    const EXTRA_CRC: u8 = 75u8;
28985    const ENCODED_LEN: usize = 109usize;
28986    fn deser(
28987        _version: MavlinkVersion,
28988        __input: &[u8],
28989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28990        let avail_len = __input.len();
28991        let mut payload_buf = [0; Self::ENCODED_LEN];
28992        let mut buf = if avail_len < Self::ENCODED_LEN {
28993            payload_buf[0..avail_len].copy_from_slice(__input);
28994            Bytes::new(&payload_buf)
28995        } else {
28996            Bytes::new(__input)
28997        };
28998        let mut __struct = Self::default();
28999        __struct.capacity_full_specification = buf.get_i32_le();
29000        __struct.capacity_full = buf.get_i32_le();
29001        __struct.cycle_count = buf.get_u16_le();
29002        __struct.weight = buf.get_u16_le();
29003        __struct.discharge_minimum_voltage = buf.get_u16_le();
29004        __struct.charging_minimum_voltage = buf.get_u16_le();
29005        __struct.resting_minimum_voltage = buf.get_u16_le();
29006        __struct.id = buf.get_u8();
29007        let tmp = buf.get_u8();
29008        __struct.battery_function =
29009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29010                enum_type: "MavBatteryFunction",
29011                value: tmp as u32,
29012            })?;
29013        let tmp = buf.get_u8();
29014        __struct.mavtype =
29015            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29016                enum_type: "MavBatteryType",
29017                value: tmp as u32,
29018            })?;
29019        for v in &mut __struct.serial_number {
29020            let val = buf.get_u8();
29021            *v = val;
29022        }
29023        for v in &mut __struct.device_name {
29024            let val = buf.get_u8();
29025            *v = val;
29026        }
29027        __struct.charging_maximum_voltage = buf.get_u16_le();
29028        __struct.cells_in_series = buf.get_u8();
29029        __struct.discharge_maximum_current = buf.get_u32_le();
29030        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29031        for v in &mut __struct.manufacture_date {
29032            let val = buf.get_u8();
29033            *v = val;
29034        }
29035        Ok(__struct)
29036    }
29037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29038        let mut __tmp = BytesMut::new(bytes);
29039        #[allow(clippy::absurd_extreme_comparisons)]
29040        #[allow(unused_comparisons)]
29041        if __tmp.remaining() < Self::ENCODED_LEN {
29042            panic!(
29043                "buffer is too small (need {} bytes, but got {})",
29044                Self::ENCODED_LEN,
29045                __tmp.remaining(),
29046            )
29047        }
29048        __tmp.put_i32_le(self.capacity_full_specification);
29049        __tmp.put_i32_le(self.capacity_full);
29050        __tmp.put_u16_le(self.cycle_count);
29051        __tmp.put_u16_le(self.weight);
29052        __tmp.put_u16_le(self.discharge_minimum_voltage);
29053        __tmp.put_u16_le(self.charging_minimum_voltage);
29054        __tmp.put_u16_le(self.resting_minimum_voltage);
29055        __tmp.put_u8(self.id);
29056        __tmp.put_u8(self.battery_function as u8);
29057        __tmp.put_u8(self.mavtype as u8);
29058        for val in &self.serial_number {
29059            __tmp.put_u8(*val);
29060        }
29061        for val in &self.device_name {
29062            __tmp.put_u8(*val);
29063        }
29064        if matches!(version, MavlinkVersion::V2) {
29065            __tmp.put_u16_le(self.charging_maximum_voltage);
29066            __tmp.put_u8(self.cells_in_series);
29067            __tmp.put_u32_le(self.discharge_maximum_current);
29068            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29069            for val in &self.manufacture_date {
29070                __tmp.put_u8(*val);
29071            }
29072            let len = __tmp.len();
29073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29074        } else {
29075            __tmp.len()
29076        }
29077    }
29078}
29079#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29080#[doc = ""]
29081#[doc = "ID: 253"]
29082#[derive(Debug, Clone, PartialEq)]
29083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29085#[cfg_attr(feature = "ts", derive(TS))]
29086#[cfg_attr(feature = "ts", ts(export))]
29087pub struct STATUSTEXT_DATA {
29088    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29089    pub severity: MavSeverity,
29090    #[doc = "Status text message, without null termination character"]
29091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29092    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29093    pub text: [u8; 50],
29094    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29096    pub id: u16,
29097    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29099    pub chunk_seq: u8,
29100}
29101impl STATUSTEXT_DATA {
29102    pub const ENCODED_LEN: usize = 54usize;
29103    pub const DEFAULT: Self = Self {
29104        severity: MavSeverity::DEFAULT,
29105        text: [0_u8; 50usize],
29106        id: 0_u16,
29107        chunk_seq: 0_u8,
29108    };
29109    #[cfg(feature = "arbitrary")]
29110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29111        use arbitrary::{Arbitrary, Unstructured};
29112        let mut buf = [0u8; 1024];
29113        rng.fill_bytes(&mut buf);
29114        let mut unstructured = Unstructured::new(&buf);
29115        Self::arbitrary(&mut unstructured).unwrap_or_default()
29116    }
29117}
29118impl Default for STATUSTEXT_DATA {
29119    fn default() -> Self {
29120        Self::DEFAULT.clone()
29121    }
29122}
29123impl MessageData for STATUSTEXT_DATA {
29124    type Message = MavMessage;
29125    const ID: u32 = 253u32;
29126    const NAME: &'static str = "STATUSTEXT";
29127    const EXTRA_CRC: u8 = 83u8;
29128    const ENCODED_LEN: usize = 54usize;
29129    fn deser(
29130        _version: MavlinkVersion,
29131        __input: &[u8],
29132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29133        let avail_len = __input.len();
29134        let mut payload_buf = [0; Self::ENCODED_LEN];
29135        let mut buf = if avail_len < Self::ENCODED_LEN {
29136            payload_buf[0..avail_len].copy_from_slice(__input);
29137            Bytes::new(&payload_buf)
29138        } else {
29139            Bytes::new(__input)
29140        };
29141        let mut __struct = Self::default();
29142        let tmp = buf.get_u8();
29143        __struct.severity =
29144            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29145                enum_type: "MavSeverity",
29146                value: tmp as u32,
29147            })?;
29148        for v in &mut __struct.text {
29149            let val = buf.get_u8();
29150            *v = val;
29151        }
29152        __struct.id = buf.get_u16_le();
29153        __struct.chunk_seq = buf.get_u8();
29154        Ok(__struct)
29155    }
29156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29157        let mut __tmp = BytesMut::new(bytes);
29158        #[allow(clippy::absurd_extreme_comparisons)]
29159        #[allow(unused_comparisons)]
29160        if __tmp.remaining() < Self::ENCODED_LEN {
29161            panic!(
29162                "buffer is too small (need {} bytes, but got {})",
29163                Self::ENCODED_LEN,
29164                __tmp.remaining(),
29165            )
29166        }
29167        __tmp.put_u8(self.severity as u8);
29168        for val in &self.text {
29169            __tmp.put_u8(*val);
29170        }
29171        if matches!(version, MavlinkVersion::V2) {
29172            __tmp.put_u16_le(self.id);
29173            __tmp.put_u8(self.chunk_seq);
29174            let len = __tmp.len();
29175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29176        } else {
29177            __tmp.len()
29178        }
29179    }
29180}
29181#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29182#[doc = ""]
29183#[doc = "ID: 261"]
29184#[derive(Debug, Clone, PartialEq)]
29185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29187#[cfg_attr(feature = "ts", derive(TS))]
29188#[cfg_attr(feature = "ts", ts(export))]
29189pub struct STORAGE_INFORMATION_DATA {
29190    #[doc = "Timestamp (time since system boot)."]
29191    pub time_boot_ms: u32,
29192    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29193    pub total_capacity: f32,
29194    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29195    pub used_capacity: f32,
29196    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29197    pub available_capacity: f32,
29198    #[doc = "Read speed."]
29199    pub read_speed: f32,
29200    #[doc = "Write speed."]
29201    pub write_speed: f32,
29202    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29203    pub storage_id: u8,
29204    #[doc = "Number of storage devices"]
29205    pub storage_count: u8,
29206    #[doc = "Status of storage"]
29207    pub status: StorageStatus,
29208    #[doc = "Type of storage"]
29209    #[cfg_attr(feature = "serde", serde(default))]
29210    pub mavtype: StorageType,
29211    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29212    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29214    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29215    pub name: [u8; 32],
29216    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29217    #[cfg_attr(feature = "serde", serde(default))]
29218    pub storage_usage: StorageUsageFlag,
29219}
29220impl STORAGE_INFORMATION_DATA {
29221    pub const ENCODED_LEN: usize = 61usize;
29222    pub const DEFAULT: Self = Self {
29223        time_boot_ms: 0_u32,
29224        total_capacity: 0.0_f32,
29225        used_capacity: 0.0_f32,
29226        available_capacity: 0.0_f32,
29227        read_speed: 0.0_f32,
29228        write_speed: 0.0_f32,
29229        storage_id: 0_u8,
29230        storage_count: 0_u8,
29231        status: StorageStatus::DEFAULT,
29232        mavtype: StorageType::DEFAULT,
29233        name: [0_u8; 32usize],
29234        storage_usage: StorageUsageFlag::DEFAULT,
29235    };
29236    #[cfg(feature = "arbitrary")]
29237    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29238        use arbitrary::{Arbitrary, Unstructured};
29239        let mut buf = [0u8; 1024];
29240        rng.fill_bytes(&mut buf);
29241        let mut unstructured = Unstructured::new(&buf);
29242        Self::arbitrary(&mut unstructured).unwrap_or_default()
29243    }
29244}
29245impl Default for STORAGE_INFORMATION_DATA {
29246    fn default() -> Self {
29247        Self::DEFAULT.clone()
29248    }
29249}
29250impl MessageData for STORAGE_INFORMATION_DATA {
29251    type Message = MavMessage;
29252    const ID: u32 = 261u32;
29253    const NAME: &'static str = "STORAGE_INFORMATION";
29254    const EXTRA_CRC: u8 = 179u8;
29255    const ENCODED_LEN: usize = 61usize;
29256    fn deser(
29257        _version: MavlinkVersion,
29258        __input: &[u8],
29259    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29260        let avail_len = __input.len();
29261        let mut payload_buf = [0; Self::ENCODED_LEN];
29262        let mut buf = if avail_len < Self::ENCODED_LEN {
29263            payload_buf[0..avail_len].copy_from_slice(__input);
29264            Bytes::new(&payload_buf)
29265        } else {
29266            Bytes::new(__input)
29267        };
29268        let mut __struct = Self::default();
29269        __struct.time_boot_ms = buf.get_u32_le();
29270        __struct.total_capacity = buf.get_f32_le();
29271        __struct.used_capacity = buf.get_f32_le();
29272        __struct.available_capacity = buf.get_f32_le();
29273        __struct.read_speed = buf.get_f32_le();
29274        __struct.write_speed = buf.get_f32_le();
29275        __struct.storage_id = buf.get_u8();
29276        __struct.storage_count = buf.get_u8();
29277        let tmp = buf.get_u8();
29278        __struct.status =
29279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29280                enum_type: "StorageStatus",
29281                value: tmp as u32,
29282            })?;
29283        let tmp = buf.get_u8();
29284        __struct.mavtype =
29285            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29286                enum_type: "StorageType",
29287                value: tmp as u32,
29288            })?;
29289        for v in &mut __struct.name {
29290            let val = buf.get_u8();
29291            *v = val;
29292        }
29293        let tmp = buf.get_u8();
29294        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
29295            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29296                flag_type: "StorageUsageFlag",
29297                value: tmp as u32,
29298            })?;
29299        Ok(__struct)
29300    }
29301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29302        let mut __tmp = BytesMut::new(bytes);
29303        #[allow(clippy::absurd_extreme_comparisons)]
29304        #[allow(unused_comparisons)]
29305        if __tmp.remaining() < Self::ENCODED_LEN {
29306            panic!(
29307                "buffer is too small (need {} bytes, but got {})",
29308                Self::ENCODED_LEN,
29309                __tmp.remaining(),
29310            )
29311        }
29312        __tmp.put_u32_le(self.time_boot_ms);
29313        __tmp.put_f32_le(self.total_capacity);
29314        __tmp.put_f32_le(self.used_capacity);
29315        __tmp.put_f32_le(self.available_capacity);
29316        __tmp.put_f32_le(self.read_speed);
29317        __tmp.put_f32_le(self.write_speed);
29318        __tmp.put_u8(self.storage_id);
29319        __tmp.put_u8(self.storage_count);
29320        __tmp.put_u8(self.status as u8);
29321        if matches!(version, MavlinkVersion::V2) {
29322            __tmp.put_u8(self.mavtype as u8);
29323            for val in &self.name {
29324                __tmp.put_u8(*val);
29325            }
29326            __tmp.put_u8(self.storage_usage.bits());
29327            let len = __tmp.len();
29328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29329        } else {
29330            __tmp.len()
29331        }
29332    }
29333}
29334#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29335#[doc = ""]
29336#[doc = "ID: 401"]
29337#[derive(Debug, Clone, PartialEq)]
29338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29340#[cfg_attr(feature = "ts", derive(TS))]
29341#[cfg_attr(feature = "ts", ts(export))]
29342pub struct SUPPORTED_TUNES_DATA {
29343    #[doc = "Bitfield of supported tune formats."]
29344    pub format: TuneFormat,
29345    #[doc = "System ID"]
29346    pub target_system: u8,
29347    #[doc = "Component ID"]
29348    pub target_component: u8,
29349}
29350impl SUPPORTED_TUNES_DATA {
29351    pub const ENCODED_LEN: usize = 6usize;
29352    pub const DEFAULT: Self = Self {
29353        format: TuneFormat::DEFAULT,
29354        target_system: 0_u8,
29355        target_component: 0_u8,
29356    };
29357    #[cfg(feature = "arbitrary")]
29358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29359        use arbitrary::{Arbitrary, Unstructured};
29360        let mut buf = [0u8; 1024];
29361        rng.fill_bytes(&mut buf);
29362        let mut unstructured = Unstructured::new(&buf);
29363        Self::arbitrary(&mut unstructured).unwrap_or_default()
29364    }
29365}
29366impl Default for SUPPORTED_TUNES_DATA {
29367    fn default() -> Self {
29368        Self::DEFAULT.clone()
29369    }
29370}
29371impl MessageData for SUPPORTED_TUNES_DATA {
29372    type Message = MavMessage;
29373    const ID: u32 = 401u32;
29374    const NAME: &'static str = "SUPPORTED_TUNES";
29375    const EXTRA_CRC: u8 = 183u8;
29376    const ENCODED_LEN: usize = 6usize;
29377    fn deser(
29378        _version: MavlinkVersion,
29379        __input: &[u8],
29380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29381        let avail_len = __input.len();
29382        let mut payload_buf = [0; Self::ENCODED_LEN];
29383        let mut buf = if avail_len < Self::ENCODED_LEN {
29384            payload_buf[0..avail_len].copy_from_slice(__input);
29385            Bytes::new(&payload_buf)
29386        } else {
29387            Bytes::new(__input)
29388        };
29389        let mut __struct = Self::default();
29390        let tmp = buf.get_u32_le();
29391        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29392            ::mavlink_core::error::ParserError::InvalidEnum {
29393                enum_type: "TuneFormat",
29394                value: tmp as u32,
29395            },
29396        )?;
29397        __struct.target_system = buf.get_u8();
29398        __struct.target_component = buf.get_u8();
29399        Ok(__struct)
29400    }
29401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29402        let mut __tmp = BytesMut::new(bytes);
29403        #[allow(clippy::absurd_extreme_comparisons)]
29404        #[allow(unused_comparisons)]
29405        if __tmp.remaining() < Self::ENCODED_LEN {
29406            panic!(
29407                "buffer is too small (need {} bytes, but got {})",
29408                Self::ENCODED_LEN,
29409                __tmp.remaining(),
29410            )
29411        }
29412        __tmp.put_u32_le(self.format as u32);
29413        __tmp.put_u8(self.target_system);
29414        __tmp.put_u8(self.target_component);
29415        if matches!(version, MavlinkVersion::V2) {
29416            let len = __tmp.len();
29417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29418        } else {
29419            __tmp.len()
29420        }
29421    }
29422}
29423#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29424#[doc = ""]
29425#[doc = "ID: 2"]
29426#[derive(Debug, Clone, PartialEq)]
29427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29429#[cfg_attr(feature = "ts", derive(TS))]
29430#[cfg_attr(feature = "ts", ts(export))]
29431pub struct SYSTEM_TIME_DATA {
29432    #[doc = "Timestamp (UNIX epoch time)."]
29433    pub time_unix_usec: u64,
29434    #[doc = "Timestamp (time since system boot)."]
29435    pub time_boot_ms: u32,
29436}
29437impl SYSTEM_TIME_DATA {
29438    pub const ENCODED_LEN: usize = 12usize;
29439    pub const DEFAULT: Self = Self {
29440        time_unix_usec: 0_u64,
29441        time_boot_ms: 0_u32,
29442    };
29443    #[cfg(feature = "arbitrary")]
29444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29445        use arbitrary::{Arbitrary, Unstructured};
29446        let mut buf = [0u8; 1024];
29447        rng.fill_bytes(&mut buf);
29448        let mut unstructured = Unstructured::new(&buf);
29449        Self::arbitrary(&mut unstructured).unwrap_or_default()
29450    }
29451}
29452impl Default for SYSTEM_TIME_DATA {
29453    fn default() -> Self {
29454        Self::DEFAULT.clone()
29455    }
29456}
29457impl MessageData for SYSTEM_TIME_DATA {
29458    type Message = MavMessage;
29459    const ID: u32 = 2u32;
29460    const NAME: &'static str = "SYSTEM_TIME";
29461    const EXTRA_CRC: u8 = 137u8;
29462    const ENCODED_LEN: usize = 12usize;
29463    fn deser(
29464        _version: MavlinkVersion,
29465        __input: &[u8],
29466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29467        let avail_len = __input.len();
29468        let mut payload_buf = [0; Self::ENCODED_LEN];
29469        let mut buf = if avail_len < Self::ENCODED_LEN {
29470            payload_buf[0..avail_len].copy_from_slice(__input);
29471            Bytes::new(&payload_buf)
29472        } else {
29473            Bytes::new(__input)
29474        };
29475        let mut __struct = Self::default();
29476        __struct.time_unix_usec = buf.get_u64_le();
29477        __struct.time_boot_ms = buf.get_u32_le();
29478        Ok(__struct)
29479    }
29480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29481        let mut __tmp = BytesMut::new(bytes);
29482        #[allow(clippy::absurd_extreme_comparisons)]
29483        #[allow(unused_comparisons)]
29484        if __tmp.remaining() < Self::ENCODED_LEN {
29485            panic!(
29486                "buffer is too small (need {} bytes, but got {})",
29487                Self::ENCODED_LEN,
29488                __tmp.remaining(),
29489            )
29490        }
29491        __tmp.put_u64_le(self.time_unix_usec);
29492        __tmp.put_u32_le(self.time_boot_ms);
29493        if matches!(version, MavlinkVersion::V2) {
29494            let len = __tmp.len();
29495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29496        } else {
29497            __tmp.len()
29498        }
29499    }
29500}
29501#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29502#[doc = ""]
29503#[doc = "ID: 1"]
29504#[derive(Debug, Clone, PartialEq)]
29505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29507#[cfg_attr(feature = "ts", derive(TS))]
29508#[cfg_attr(feature = "ts", ts(export))]
29509pub struct SYS_STATUS_DATA {
29510    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29511    pub onboard_control_sensors_present: MavSysStatusSensor,
29512    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29513    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29514    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29515    pub onboard_control_sensors_health: MavSysStatusSensor,
29516    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29517    pub load: u16,
29518    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29519    pub voltage_battery: u16,
29520    #[doc = "Battery current, -1: Current not sent by autopilot"]
29521    pub current_battery: i16,
29522    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29523    pub drop_rate_comm: u16,
29524    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29525    pub errors_comm: u16,
29526    #[doc = "Autopilot-specific errors"]
29527    pub errors_count1: u16,
29528    #[doc = "Autopilot-specific errors"]
29529    pub errors_count2: u16,
29530    #[doc = "Autopilot-specific errors"]
29531    pub errors_count3: u16,
29532    #[doc = "Autopilot-specific errors"]
29533    pub errors_count4: u16,
29534    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29535    pub battery_remaining: i8,
29536    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29537    #[cfg_attr(feature = "serde", serde(default))]
29538    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29539    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29540    #[cfg_attr(feature = "serde", serde(default))]
29541    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29542    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29543    #[cfg_attr(feature = "serde", serde(default))]
29544    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29545}
29546impl SYS_STATUS_DATA {
29547    pub const ENCODED_LEN: usize = 43usize;
29548    pub const DEFAULT: Self = Self {
29549        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29550        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29551        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29552        load: 0_u16,
29553        voltage_battery: 0_u16,
29554        current_battery: 0_i16,
29555        drop_rate_comm: 0_u16,
29556        errors_comm: 0_u16,
29557        errors_count1: 0_u16,
29558        errors_count2: 0_u16,
29559        errors_count3: 0_u16,
29560        errors_count4: 0_u16,
29561        battery_remaining: 0_i8,
29562        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29563        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29564        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29565    };
29566    #[cfg(feature = "arbitrary")]
29567    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29568        use arbitrary::{Arbitrary, Unstructured};
29569        let mut buf = [0u8; 1024];
29570        rng.fill_bytes(&mut buf);
29571        let mut unstructured = Unstructured::new(&buf);
29572        Self::arbitrary(&mut unstructured).unwrap_or_default()
29573    }
29574}
29575impl Default for SYS_STATUS_DATA {
29576    fn default() -> Self {
29577        Self::DEFAULT.clone()
29578    }
29579}
29580impl MessageData for SYS_STATUS_DATA {
29581    type Message = MavMessage;
29582    const ID: u32 = 1u32;
29583    const NAME: &'static str = "SYS_STATUS";
29584    const EXTRA_CRC: u8 = 124u8;
29585    const ENCODED_LEN: usize = 43usize;
29586    fn deser(
29587        _version: MavlinkVersion,
29588        __input: &[u8],
29589    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29590        let avail_len = __input.len();
29591        let mut payload_buf = [0; Self::ENCODED_LEN];
29592        let mut buf = if avail_len < Self::ENCODED_LEN {
29593            payload_buf[0..avail_len].copy_from_slice(__input);
29594            Bytes::new(&payload_buf)
29595        } else {
29596            Bytes::new(__input)
29597        };
29598        let mut __struct = Self::default();
29599        let tmp = buf.get_u32_le();
29600        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29601            tmp & MavSysStatusSensor::all().bits(),
29602        )
29603        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29604            flag_type: "MavSysStatusSensor",
29605            value: tmp as u32,
29606        })?;
29607        let tmp = buf.get_u32_le();
29608        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29609            tmp & MavSysStatusSensor::all().bits(),
29610        )
29611        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29612            flag_type: "MavSysStatusSensor",
29613            value: tmp as u32,
29614        })?;
29615        let tmp = buf.get_u32_le();
29616        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29617            tmp & MavSysStatusSensor::all().bits(),
29618        )
29619        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29620            flag_type: "MavSysStatusSensor",
29621            value: tmp as u32,
29622        })?;
29623        __struct.load = buf.get_u16_le();
29624        __struct.voltage_battery = buf.get_u16_le();
29625        __struct.current_battery = buf.get_i16_le();
29626        __struct.drop_rate_comm = buf.get_u16_le();
29627        __struct.errors_comm = buf.get_u16_le();
29628        __struct.errors_count1 = buf.get_u16_le();
29629        __struct.errors_count2 = buf.get_u16_le();
29630        __struct.errors_count3 = buf.get_u16_le();
29631        __struct.errors_count4 = buf.get_u16_le();
29632        __struct.battery_remaining = buf.get_i8();
29633        let tmp = buf.get_u32_le();
29634        __struct.onboard_control_sensors_present_extended =
29635            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29636                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29637                flag_type: "MavSysStatusSensorExtended",
29638                value: tmp as u32,
29639            })?;
29640        let tmp = buf.get_u32_le();
29641        __struct.onboard_control_sensors_enabled_extended =
29642            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29643                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29644                flag_type: "MavSysStatusSensorExtended",
29645                value: tmp as u32,
29646            })?;
29647        let tmp = buf.get_u32_le();
29648        __struct.onboard_control_sensors_health_extended =
29649            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29650                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29651                flag_type: "MavSysStatusSensorExtended",
29652                value: tmp as u32,
29653            })?;
29654        Ok(__struct)
29655    }
29656    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29657        let mut __tmp = BytesMut::new(bytes);
29658        #[allow(clippy::absurd_extreme_comparisons)]
29659        #[allow(unused_comparisons)]
29660        if __tmp.remaining() < Self::ENCODED_LEN {
29661            panic!(
29662                "buffer is too small (need {} bytes, but got {})",
29663                Self::ENCODED_LEN,
29664                __tmp.remaining(),
29665            )
29666        }
29667        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29668        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29669        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29670        __tmp.put_u16_le(self.load);
29671        __tmp.put_u16_le(self.voltage_battery);
29672        __tmp.put_i16_le(self.current_battery);
29673        __tmp.put_u16_le(self.drop_rate_comm);
29674        __tmp.put_u16_le(self.errors_comm);
29675        __tmp.put_u16_le(self.errors_count1);
29676        __tmp.put_u16_le(self.errors_count2);
29677        __tmp.put_u16_le(self.errors_count3);
29678        __tmp.put_u16_le(self.errors_count4);
29679        __tmp.put_i8(self.battery_remaining);
29680        if matches!(version, MavlinkVersion::V2) {
29681            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29682            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29683            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29684            let len = __tmp.len();
29685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29686        } else {
29687            __tmp.len()
29688        }
29689    }
29690}
29691#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29692#[doc = ""]
29693#[doc = "ID: 135"]
29694#[derive(Debug, Clone, PartialEq)]
29695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29697#[cfg_attr(feature = "ts", derive(TS))]
29698#[cfg_attr(feature = "ts", ts(export))]
29699pub struct TERRAIN_CHECK_DATA {
29700    #[doc = "Latitude"]
29701    pub lat: i32,
29702    #[doc = "Longitude"]
29703    pub lon: i32,
29704}
29705impl TERRAIN_CHECK_DATA {
29706    pub const ENCODED_LEN: usize = 8usize;
29707    pub const DEFAULT: Self = Self {
29708        lat: 0_i32,
29709        lon: 0_i32,
29710    };
29711    #[cfg(feature = "arbitrary")]
29712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29713        use arbitrary::{Arbitrary, Unstructured};
29714        let mut buf = [0u8; 1024];
29715        rng.fill_bytes(&mut buf);
29716        let mut unstructured = Unstructured::new(&buf);
29717        Self::arbitrary(&mut unstructured).unwrap_or_default()
29718    }
29719}
29720impl Default for TERRAIN_CHECK_DATA {
29721    fn default() -> Self {
29722        Self::DEFAULT.clone()
29723    }
29724}
29725impl MessageData for TERRAIN_CHECK_DATA {
29726    type Message = MavMessage;
29727    const ID: u32 = 135u32;
29728    const NAME: &'static str = "TERRAIN_CHECK";
29729    const EXTRA_CRC: u8 = 203u8;
29730    const ENCODED_LEN: usize = 8usize;
29731    fn deser(
29732        _version: MavlinkVersion,
29733        __input: &[u8],
29734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29735        let avail_len = __input.len();
29736        let mut payload_buf = [0; Self::ENCODED_LEN];
29737        let mut buf = if avail_len < Self::ENCODED_LEN {
29738            payload_buf[0..avail_len].copy_from_slice(__input);
29739            Bytes::new(&payload_buf)
29740        } else {
29741            Bytes::new(__input)
29742        };
29743        let mut __struct = Self::default();
29744        __struct.lat = buf.get_i32_le();
29745        __struct.lon = buf.get_i32_le();
29746        Ok(__struct)
29747    }
29748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29749        let mut __tmp = BytesMut::new(bytes);
29750        #[allow(clippy::absurd_extreme_comparisons)]
29751        #[allow(unused_comparisons)]
29752        if __tmp.remaining() < Self::ENCODED_LEN {
29753            panic!(
29754                "buffer is too small (need {} bytes, but got {})",
29755                Self::ENCODED_LEN,
29756                __tmp.remaining(),
29757            )
29758        }
29759        __tmp.put_i32_le(self.lat);
29760        __tmp.put_i32_le(self.lon);
29761        if matches!(version, MavlinkVersion::V2) {
29762            let len = __tmp.len();
29763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29764        } else {
29765            __tmp.len()
29766        }
29767    }
29768}
29769#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29770#[doc = ""]
29771#[doc = "ID: 134"]
29772#[derive(Debug, Clone, PartialEq)]
29773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29775#[cfg_attr(feature = "ts", derive(TS))]
29776#[cfg_attr(feature = "ts", ts(export))]
29777pub struct TERRAIN_DATA_DATA {
29778    #[doc = "Latitude of SW corner of first grid"]
29779    pub lat: i32,
29780    #[doc = "Longitude of SW corner of first grid"]
29781    pub lon: i32,
29782    #[doc = "Grid spacing"]
29783    pub grid_spacing: u16,
29784    #[doc = "Terrain data MSL"]
29785    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29786    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29787    pub data: [i16; 16],
29788    #[doc = "bit within the terrain request mask"]
29789    pub gridbit: u8,
29790}
29791impl TERRAIN_DATA_DATA {
29792    pub const ENCODED_LEN: usize = 43usize;
29793    pub const DEFAULT: Self = Self {
29794        lat: 0_i32,
29795        lon: 0_i32,
29796        grid_spacing: 0_u16,
29797        data: [0_i16; 16usize],
29798        gridbit: 0_u8,
29799    };
29800    #[cfg(feature = "arbitrary")]
29801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29802        use arbitrary::{Arbitrary, Unstructured};
29803        let mut buf = [0u8; 1024];
29804        rng.fill_bytes(&mut buf);
29805        let mut unstructured = Unstructured::new(&buf);
29806        Self::arbitrary(&mut unstructured).unwrap_or_default()
29807    }
29808}
29809impl Default for TERRAIN_DATA_DATA {
29810    fn default() -> Self {
29811        Self::DEFAULT.clone()
29812    }
29813}
29814impl MessageData for TERRAIN_DATA_DATA {
29815    type Message = MavMessage;
29816    const ID: u32 = 134u32;
29817    const NAME: &'static str = "TERRAIN_DATA";
29818    const EXTRA_CRC: u8 = 229u8;
29819    const ENCODED_LEN: usize = 43usize;
29820    fn deser(
29821        _version: MavlinkVersion,
29822        __input: &[u8],
29823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29824        let avail_len = __input.len();
29825        let mut payload_buf = [0; Self::ENCODED_LEN];
29826        let mut buf = if avail_len < Self::ENCODED_LEN {
29827            payload_buf[0..avail_len].copy_from_slice(__input);
29828            Bytes::new(&payload_buf)
29829        } else {
29830            Bytes::new(__input)
29831        };
29832        let mut __struct = Self::default();
29833        __struct.lat = buf.get_i32_le();
29834        __struct.lon = buf.get_i32_le();
29835        __struct.grid_spacing = buf.get_u16_le();
29836        for v in &mut __struct.data {
29837            let val = buf.get_i16_le();
29838            *v = val;
29839        }
29840        __struct.gridbit = buf.get_u8();
29841        Ok(__struct)
29842    }
29843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29844        let mut __tmp = BytesMut::new(bytes);
29845        #[allow(clippy::absurd_extreme_comparisons)]
29846        #[allow(unused_comparisons)]
29847        if __tmp.remaining() < Self::ENCODED_LEN {
29848            panic!(
29849                "buffer is too small (need {} bytes, but got {})",
29850                Self::ENCODED_LEN,
29851                __tmp.remaining(),
29852            )
29853        }
29854        __tmp.put_i32_le(self.lat);
29855        __tmp.put_i32_le(self.lon);
29856        __tmp.put_u16_le(self.grid_spacing);
29857        for val in &self.data {
29858            __tmp.put_i16_le(*val);
29859        }
29860        __tmp.put_u8(self.gridbit);
29861        if matches!(version, MavlinkVersion::V2) {
29862            let len = __tmp.len();
29863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29864        } else {
29865            __tmp.len()
29866        }
29867    }
29868}
29869#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29870#[doc = ""]
29871#[doc = "ID: 136"]
29872#[derive(Debug, Clone, PartialEq)]
29873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29875#[cfg_attr(feature = "ts", derive(TS))]
29876#[cfg_attr(feature = "ts", ts(export))]
29877pub struct TERRAIN_REPORT_DATA {
29878    #[doc = "Latitude"]
29879    pub lat: i32,
29880    #[doc = "Longitude"]
29881    pub lon: i32,
29882    #[doc = "Terrain height MSL"]
29883    pub terrain_height: f32,
29884    #[doc = "Current vehicle height above lat/lon terrain height"]
29885    pub current_height: f32,
29886    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29887    pub spacing: u16,
29888    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29889    pub pending: u16,
29890    #[doc = "Number of 4x4 terrain blocks in memory"]
29891    pub loaded: u16,
29892}
29893impl TERRAIN_REPORT_DATA {
29894    pub const ENCODED_LEN: usize = 22usize;
29895    pub const DEFAULT: Self = Self {
29896        lat: 0_i32,
29897        lon: 0_i32,
29898        terrain_height: 0.0_f32,
29899        current_height: 0.0_f32,
29900        spacing: 0_u16,
29901        pending: 0_u16,
29902        loaded: 0_u16,
29903    };
29904    #[cfg(feature = "arbitrary")]
29905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29906        use arbitrary::{Arbitrary, Unstructured};
29907        let mut buf = [0u8; 1024];
29908        rng.fill_bytes(&mut buf);
29909        let mut unstructured = Unstructured::new(&buf);
29910        Self::arbitrary(&mut unstructured).unwrap_or_default()
29911    }
29912}
29913impl Default for TERRAIN_REPORT_DATA {
29914    fn default() -> Self {
29915        Self::DEFAULT.clone()
29916    }
29917}
29918impl MessageData for TERRAIN_REPORT_DATA {
29919    type Message = MavMessage;
29920    const ID: u32 = 136u32;
29921    const NAME: &'static str = "TERRAIN_REPORT";
29922    const EXTRA_CRC: u8 = 1u8;
29923    const ENCODED_LEN: usize = 22usize;
29924    fn deser(
29925        _version: MavlinkVersion,
29926        __input: &[u8],
29927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29928        let avail_len = __input.len();
29929        let mut payload_buf = [0; Self::ENCODED_LEN];
29930        let mut buf = if avail_len < Self::ENCODED_LEN {
29931            payload_buf[0..avail_len].copy_from_slice(__input);
29932            Bytes::new(&payload_buf)
29933        } else {
29934            Bytes::new(__input)
29935        };
29936        let mut __struct = Self::default();
29937        __struct.lat = buf.get_i32_le();
29938        __struct.lon = buf.get_i32_le();
29939        __struct.terrain_height = buf.get_f32_le();
29940        __struct.current_height = buf.get_f32_le();
29941        __struct.spacing = buf.get_u16_le();
29942        __struct.pending = buf.get_u16_le();
29943        __struct.loaded = buf.get_u16_le();
29944        Ok(__struct)
29945    }
29946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29947        let mut __tmp = BytesMut::new(bytes);
29948        #[allow(clippy::absurd_extreme_comparisons)]
29949        #[allow(unused_comparisons)]
29950        if __tmp.remaining() < Self::ENCODED_LEN {
29951            panic!(
29952                "buffer is too small (need {} bytes, but got {})",
29953                Self::ENCODED_LEN,
29954                __tmp.remaining(),
29955            )
29956        }
29957        __tmp.put_i32_le(self.lat);
29958        __tmp.put_i32_le(self.lon);
29959        __tmp.put_f32_le(self.terrain_height);
29960        __tmp.put_f32_le(self.current_height);
29961        __tmp.put_u16_le(self.spacing);
29962        __tmp.put_u16_le(self.pending);
29963        __tmp.put_u16_le(self.loaded);
29964        if matches!(version, MavlinkVersion::V2) {
29965            let len = __tmp.len();
29966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29967        } else {
29968            __tmp.len()
29969        }
29970    }
29971}
29972#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29973#[doc = ""]
29974#[doc = "ID: 133"]
29975#[derive(Debug, Clone, PartialEq)]
29976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29978#[cfg_attr(feature = "ts", derive(TS))]
29979#[cfg_attr(feature = "ts", ts(export))]
29980pub struct TERRAIN_REQUEST_DATA {
29981    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29982    pub mask: u64,
29983    #[doc = "Latitude of SW corner of first grid"]
29984    pub lat: i32,
29985    #[doc = "Longitude of SW corner of first grid"]
29986    pub lon: i32,
29987    #[doc = "Grid spacing"]
29988    pub grid_spacing: u16,
29989}
29990impl TERRAIN_REQUEST_DATA {
29991    pub const ENCODED_LEN: usize = 18usize;
29992    pub const DEFAULT: Self = Self {
29993        mask: 0_u64,
29994        lat: 0_i32,
29995        lon: 0_i32,
29996        grid_spacing: 0_u16,
29997    };
29998    #[cfg(feature = "arbitrary")]
29999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30000        use arbitrary::{Arbitrary, Unstructured};
30001        let mut buf = [0u8; 1024];
30002        rng.fill_bytes(&mut buf);
30003        let mut unstructured = Unstructured::new(&buf);
30004        Self::arbitrary(&mut unstructured).unwrap_or_default()
30005    }
30006}
30007impl Default for TERRAIN_REQUEST_DATA {
30008    fn default() -> Self {
30009        Self::DEFAULT.clone()
30010    }
30011}
30012impl MessageData for TERRAIN_REQUEST_DATA {
30013    type Message = MavMessage;
30014    const ID: u32 = 133u32;
30015    const NAME: &'static str = "TERRAIN_REQUEST";
30016    const EXTRA_CRC: u8 = 6u8;
30017    const ENCODED_LEN: usize = 18usize;
30018    fn deser(
30019        _version: MavlinkVersion,
30020        __input: &[u8],
30021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30022        let avail_len = __input.len();
30023        let mut payload_buf = [0; Self::ENCODED_LEN];
30024        let mut buf = if avail_len < Self::ENCODED_LEN {
30025            payload_buf[0..avail_len].copy_from_slice(__input);
30026            Bytes::new(&payload_buf)
30027        } else {
30028            Bytes::new(__input)
30029        };
30030        let mut __struct = Self::default();
30031        __struct.mask = buf.get_u64_le();
30032        __struct.lat = buf.get_i32_le();
30033        __struct.lon = buf.get_i32_le();
30034        __struct.grid_spacing = buf.get_u16_le();
30035        Ok(__struct)
30036    }
30037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30038        let mut __tmp = BytesMut::new(bytes);
30039        #[allow(clippy::absurd_extreme_comparisons)]
30040        #[allow(unused_comparisons)]
30041        if __tmp.remaining() < Self::ENCODED_LEN {
30042            panic!(
30043                "buffer is too small (need {} bytes, but got {})",
30044                Self::ENCODED_LEN,
30045                __tmp.remaining(),
30046            )
30047        }
30048        __tmp.put_u64_le(self.mask);
30049        __tmp.put_i32_le(self.lat);
30050        __tmp.put_i32_le(self.lon);
30051        __tmp.put_u16_le(self.grid_spacing);
30052        if matches!(version, MavlinkVersion::V2) {
30053            let len = __tmp.len();
30054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30055        } else {
30056            __tmp.len()
30057        }
30058    }
30059}
30060#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30061#[doc = ""]
30062#[doc = "ID: 111"]
30063#[derive(Debug, Clone, PartialEq)]
30064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30066#[cfg_attr(feature = "ts", derive(TS))]
30067#[cfg_attr(feature = "ts", ts(export))]
30068pub struct TIMESYNC_DATA {
30069    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30070    pub tc1: i64,
30071    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30072    pub ts1: i64,
30073    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30074    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30075    pub target_system: u8,
30076    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30077    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30078    pub target_component: u8,
30079}
30080impl TIMESYNC_DATA {
30081    pub const ENCODED_LEN: usize = 18usize;
30082    pub const DEFAULT: Self = Self {
30083        tc1: 0_i64,
30084        ts1: 0_i64,
30085        target_system: 0_u8,
30086        target_component: 0_u8,
30087    };
30088    #[cfg(feature = "arbitrary")]
30089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30090        use arbitrary::{Arbitrary, Unstructured};
30091        let mut buf = [0u8; 1024];
30092        rng.fill_bytes(&mut buf);
30093        let mut unstructured = Unstructured::new(&buf);
30094        Self::arbitrary(&mut unstructured).unwrap_or_default()
30095    }
30096}
30097impl Default for TIMESYNC_DATA {
30098    fn default() -> Self {
30099        Self::DEFAULT.clone()
30100    }
30101}
30102impl MessageData for TIMESYNC_DATA {
30103    type Message = MavMessage;
30104    const ID: u32 = 111u32;
30105    const NAME: &'static str = "TIMESYNC";
30106    const EXTRA_CRC: u8 = 34u8;
30107    const ENCODED_LEN: usize = 18usize;
30108    fn deser(
30109        _version: MavlinkVersion,
30110        __input: &[u8],
30111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30112        let avail_len = __input.len();
30113        let mut payload_buf = [0; Self::ENCODED_LEN];
30114        let mut buf = if avail_len < Self::ENCODED_LEN {
30115            payload_buf[0..avail_len].copy_from_slice(__input);
30116            Bytes::new(&payload_buf)
30117        } else {
30118            Bytes::new(__input)
30119        };
30120        let mut __struct = Self::default();
30121        __struct.tc1 = buf.get_i64_le();
30122        __struct.ts1 = buf.get_i64_le();
30123        __struct.target_system = buf.get_u8();
30124        __struct.target_component = buf.get_u8();
30125        Ok(__struct)
30126    }
30127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30128        let mut __tmp = BytesMut::new(bytes);
30129        #[allow(clippy::absurd_extreme_comparisons)]
30130        #[allow(unused_comparisons)]
30131        if __tmp.remaining() < Self::ENCODED_LEN {
30132            panic!(
30133                "buffer is too small (need {} bytes, but got {})",
30134                Self::ENCODED_LEN,
30135                __tmp.remaining(),
30136            )
30137        }
30138        __tmp.put_i64_le(self.tc1);
30139        __tmp.put_i64_le(self.ts1);
30140        if matches!(version, MavlinkVersion::V2) {
30141            __tmp.put_u8(self.target_system);
30142            __tmp.put_u8(self.target_component);
30143            let len = __tmp.len();
30144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30145        } else {
30146            __tmp.len()
30147        }
30148    }
30149}
30150#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30151#[doc = ""]
30152#[doc = "ID: 380"]
30153#[derive(Debug, Clone, PartialEq)]
30154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30156#[cfg_attr(feature = "ts", derive(TS))]
30157#[cfg_attr(feature = "ts", ts(export))]
30158pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30159    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30160    pub safe_return: i32,
30161    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30162    pub land: i32,
30163    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30164    pub mission_next_item: i32,
30165    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30166    pub mission_end: i32,
30167    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30168    pub commanded_action: i32,
30169}
30170impl TIME_ESTIMATE_TO_TARGET_DATA {
30171    pub const ENCODED_LEN: usize = 20usize;
30172    pub const DEFAULT: Self = Self {
30173        safe_return: 0_i32,
30174        land: 0_i32,
30175        mission_next_item: 0_i32,
30176        mission_end: 0_i32,
30177        commanded_action: 0_i32,
30178    };
30179    #[cfg(feature = "arbitrary")]
30180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30181        use arbitrary::{Arbitrary, Unstructured};
30182        let mut buf = [0u8; 1024];
30183        rng.fill_bytes(&mut buf);
30184        let mut unstructured = Unstructured::new(&buf);
30185        Self::arbitrary(&mut unstructured).unwrap_or_default()
30186    }
30187}
30188impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30189    fn default() -> Self {
30190        Self::DEFAULT.clone()
30191    }
30192}
30193impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30194    type Message = MavMessage;
30195    const ID: u32 = 380u32;
30196    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30197    const EXTRA_CRC: u8 = 232u8;
30198    const ENCODED_LEN: usize = 20usize;
30199    fn deser(
30200        _version: MavlinkVersion,
30201        __input: &[u8],
30202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30203        let avail_len = __input.len();
30204        let mut payload_buf = [0; Self::ENCODED_LEN];
30205        let mut buf = if avail_len < Self::ENCODED_LEN {
30206            payload_buf[0..avail_len].copy_from_slice(__input);
30207            Bytes::new(&payload_buf)
30208        } else {
30209            Bytes::new(__input)
30210        };
30211        let mut __struct = Self::default();
30212        __struct.safe_return = buf.get_i32_le();
30213        __struct.land = buf.get_i32_le();
30214        __struct.mission_next_item = buf.get_i32_le();
30215        __struct.mission_end = buf.get_i32_le();
30216        __struct.commanded_action = buf.get_i32_le();
30217        Ok(__struct)
30218    }
30219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30220        let mut __tmp = BytesMut::new(bytes);
30221        #[allow(clippy::absurd_extreme_comparisons)]
30222        #[allow(unused_comparisons)]
30223        if __tmp.remaining() < Self::ENCODED_LEN {
30224            panic!(
30225                "buffer is too small (need {} bytes, but got {})",
30226                Self::ENCODED_LEN,
30227                __tmp.remaining(),
30228            )
30229        }
30230        __tmp.put_i32_le(self.safe_return);
30231        __tmp.put_i32_le(self.land);
30232        __tmp.put_i32_le(self.mission_next_item);
30233        __tmp.put_i32_le(self.mission_end);
30234        __tmp.put_i32_le(self.commanded_action);
30235        if matches!(version, MavlinkVersion::V2) {
30236            let len = __tmp.len();
30237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30238        } else {
30239            __tmp.len()
30240        }
30241    }
30242}
30243#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30244#[doc = ""]
30245#[doc = "ID: 333"]
30246#[derive(Debug, Clone, PartialEq)]
30247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30249#[cfg_attr(feature = "ts", derive(TS))]
30250#[cfg_attr(feature = "ts", ts(export))]
30251pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30252    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30253    pub time_usec: u64,
30254    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30256    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30257    pub pos_x: [f32; 5],
30258    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30260    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30261    pub pos_y: [f32; 5],
30262    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30263    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30264    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30265    pub pos_z: [f32; 5],
30266    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30267    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30268    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30269    pub delta: [f32; 5],
30270    #[doc = "Yaw. Set to NaN for unchanged"]
30271    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30272    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30273    pub pos_yaw: [f32; 5],
30274    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30275    pub valid_points: u8,
30276}
30277impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30278    pub const ENCODED_LEN: usize = 109usize;
30279    pub const DEFAULT: Self = Self {
30280        time_usec: 0_u64,
30281        pos_x: [0.0_f32; 5usize],
30282        pos_y: [0.0_f32; 5usize],
30283        pos_z: [0.0_f32; 5usize],
30284        delta: [0.0_f32; 5usize],
30285        pos_yaw: [0.0_f32; 5usize],
30286        valid_points: 0_u8,
30287    };
30288    #[cfg(feature = "arbitrary")]
30289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30290        use arbitrary::{Arbitrary, Unstructured};
30291        let mut buf = [0u8; 1024];
30292        rng.fill_bytes(&mut buf);
30293        let mut unstructured = Unstructured::new(&buf);
30294        Self::arbitrary(&mut unstructured).unwrap_or_default()
30295    }
30296}
30297impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30298    fn default() -> Self {
30299        Self::DEFAULT.clone()
30300    }
30301}
30302impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30303    type Message = MavMessage;
30304    const ID: u32 = 333u32;
30305    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30306    const EXTRA_CRC: u8 = 231u8;
30307    const ENCODED_LEN: usize = 109usize;
30308    fn deser(
30309        _version: MavlinkVersion,
30310        __input: &[u8],
30311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30312        let avail_len = __input.len();
30313        let mut payload_buf = [0; Self::ENCODED_LEN];
30314        let mut buf = if avail_len < Self::ENCODED_LEN {
30315            payload_buf[0..avail_len].copy_from_slice(__input);
30316            Bytes::new(&payload_buf)
30317        } else {
30318            Bytes::new(__input)
30319        };
30320        let mut __struct = Self::default();
30321        __struct.time_usec = buf.get_u64_le();
30322        for v in &mut __struct.pos_x {
30323            let val = buf.get_f32_le();
30324            *v = val;
30325        }
30326        for v in &mut __struct.pos_y {
30327            let val = buf.get_f32_le();
30328            *v = val;
30329        }
30330        for v in &mut __struct.pos_z {
30331            let val = buf.get_f32_le();
30332            *v = val;
30333        }
30334        for v in &mut __struct.delta {
30335            let val = buf.get_f32_le();
30336            *v = val;
30337        }
30338        for v in &mut __struct.pos_yaw {
30339            let val = buf.get_f32_le();
30340            *v = val;
30341        }
30342        __struct.valid_points = buf.get_u8();
30343        Ok(__struct)
30344    }
30345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30346        let mut __tmp = BytesMut::new(bytes);
30347        #[allow(clippy::absurd_extreme_comparisons)]
30348        #[allow(unused_comparisons)]
30349        if __tmp.remaining() < Self::ENCODED_LEN {
30350            panic!(
30351                "buffer is too small (need {} bytes, but got {})",
30352                Self::ENCODED_LEN,
30353                __tmp.remaining(),
30354            )
30355        }
30356        __tmp.put_u64_le(self.time_usec);
30357        for val in &self.pos_x {
30358            __tmp.put_f32_le(*val);
30359        }
30360        for val in &self.pos_y {
30361            __tmp.put_f32_le(*val);
30362        }
30363        for val in &self.pos_z {
30364            __tmp.put_f32_le(*val);
30365        }
30366        for val in &self.delta {
30367            __tmp.put_f32_le(*val);
30368        }
30369        for val in &self.pos_yaw {
30370            __tmp.put_f32_le(*val);
30371        }
30372        __tmp.put_u8(self.valid_points);
30373        if matches!(version, MavlinkVersion::V2) {
30374            let len = __tmp.len();
30375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30376        } else {
30377            __tmp.len()
30378        }
30379    }
30380}
30381#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30382#[doc = ""]
30383#[doc = "ID: 332"]
30384#[derive(Debug, Clone, PartialEq)]
30385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30387#[cfg_attr(feature = "ts", derive(TS))]
30388#[cfg_attr(feature = "ts", ts(export))]
30389pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30390    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30391    pub time_usec: u64,
30392    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30393    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30394    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30395    pub pos_x: [f32; 5],
30396    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30397    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30398    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30399    pub pos_y: [f32; 5],
30400    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30401    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30402    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30403    pub pos_z: [f32; 5],
30404    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30406    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30407    pub vel_x: [f32; 5],
30408    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30409    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30410    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30411    pub vel_y: [f32; 5],
30412    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30413    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30414    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30415    pub vel_z: [f32; 5],
30416    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30417    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30418    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30419    pub acc_x: [f32; 5],
30420    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30421    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30422    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30423    pub acc_y: [f32; 5],
30424    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30427    pub acc_z: [f32; 5],
30428    #[doc = "Yaw angle, set to NaN if not being used"]
30429    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30430    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30431    pub pos_yaw: [f32; 5],
30432    #[doc = "Yaw rate, set to NaN if not being used"]
30433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30435    pub vel_yaw: [f32; 5],
30436    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30438    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30439    pub command: [u16; 5],
30440    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30441    pub valid_points: u8,
30442}
30443impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30444    pub const ENCODED_LEN: usize = 239usize;
30445    pub const DEFAULT: Self = Self {
30446        time_usec: 0_u64,
30447        pos_x: [0.0_f32; 5usize],
30448        pos_y: [0.0_f32; 5usize],
30449        pos_z: [0.0_f32; 5usize],
30450        vel_x: [0.0_f32; 5usize],
30451        vel_y: [0.0_f32; 5usize],
30452        vel_z: [0.0_f32; 5usize],
30453        acc_x: [0.0_f32; 5usize],
30454        acc_y: [0.0_f32; 5usize],
30455        acc_z: [0.0_f32; 5usize],
30456        pos_yaw: [0.0_f32; 5usize],
30457        vel_yaw: [0.0_f32; 5usize],
30458        command: [0_u16; 5usize],
30459        valid_points: 0_u8,
30460    };
30461    #[cfg(feature = "arbitrary")]
30462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30463        use arbitrary::{Arbitrary, Unstructured};
30464        let mut buf = [0u8; 1024];
30465        rng.fill_bytes(&mut buf);
30466        let mut unstructured = Unstructured::new(&buf);
30467        Self::arbitrary(&mut unstructured).unwrap_or_default()
30468    }
30469}
30470impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30471    fn default() -> Self {
30472        Self::DEFAULT.clone()
30473    }
30474}
30475impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30476    type Message = MavMessage;
30477    const ID: u32 = 332u32;
30478    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30479    const EXTRA_CRC: u8 = 236u8;
30480    const ENCODED_LEN: usize = 239usize;
30481    fn deser(
30482        _version: MavlinkVersion,
30483        __input: &[u8],
30484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30485        let avail_len = __input.len();
30486        let mut payload_buf = [0; Self::ENCODED_LEN];
30487        let mut buf = if avail_len < Self::ENCODED_LEN {
30488            payload_buf[0..avail_len].copy_from_slice(__input);
30489            Bytes::new(&payload_buf)
30490        } else {
30491            Bytes::new(__input)
30492        };
30493        let mut __struct = Self::default();
30494        __struct.time_usec = buf.get_u64_le();
30495        for v in &mut __struct.pos_x {
30496            let val = buf.get_f32_le();
30497            *v = val;
30498        }
30499        for v in &mut __struct.pos_y {
30500            let val = buf.get_f32_le();
30501            *v = val;
30502        }
30503        for v in &mut __struct.pos_z {
30504            let val = buf.get_f32_le();
30505            *v = val;
30506        }
30507        for v in &mut __struct.vel_x {
30508            let val = buf.get_f32_le();
30509            *v = val;
30510        }
30511        for v in &mut __struct.vel_y {
30512            let val = buf.get_f32_le();
30513            *v = val;
30514        }
30515        for v in &mut __struct.vel_z {
30516            let val = buf.get_f32_le();
30517            *v = val;
30518        }
30519        for v in &mut __struct.acc_x {
30520            let val = buf.get_f32_le();
30521            *v = val;
30522        }
30523        for v in &mut __struct.acc_y {
30524            let val = buf.get_f32_le();
30525            *v = val;
30526        }
30527        for v in &mut __struct.acc_z {
30528            let val = buf.get_f32_le();
30529            *v = val;
30530        }
30531        for v in &mut __struct.pos_yaw {
30532            let val = buf.get_f32_le();
30533            *v = val;
30534        }
30535        for v in &mut __struct.vel_yaw {
30536            let val = buf.get_f32_le();
30537            *v = val;
30538        }
30539        for v in &mut __struct.command {
30540            let val = buf.get_u16_le();
30541            *v = val;
30542        }
30543        __struct.valid_points = buf.get_u8();
30544        Ok(__struct)
30545    }
30546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30547        let mut __tmp = BytesMut::new(bytes);
30548        #[allow(clippy::absurd_extreme_comparisons)]
30549        #[allow(unused_comparisons)]
30550        if __tmp.remaining() < Self::ENCODED_LEN {
30551            panic!(
30552                "buffer is too small (need {} bytes, but got {})",
30553                Self::ENCODED_LEN,
30554                __tmp.remaining(),
30555            )
30556        }
30557        __tmp.put_u64_le(self.time_usec);
30558        for val in &self.pos_x {
30559            __tmp.put_f32_le(*val);
30560        }
30561        for val in &self.pos_y {
30562            __tmp.put_f32_le(*val);
30563        }
30564        for val in &self.pos_z {
30565            __tmp.put_f32_le(*val);
30566        }
30567        for val in &self.vel_x {
30568            __tmp.put_f32_le(*val);
30569        }
30570        for val in &self.vel_y {
30571            __tmp.put_f32_le(*val);
30572        }
30573        for val in &self.vel_z {
30574            __tmp.put_f32_le(*val);
30575        }
30576        for val in &self.acc_x {
30577            __tmp.put_f32_le(*val);
30578        }
30579        for val in &self.acc_y {
30580            __tmp.put_f32_le(*val);
30581        }
30582        for val in &self.acc_z {
30583            __tmp.put_f32_le(*val);
30584        }
30585        for val in &self.pos_yaw {
30586            __tmp.put_f32_le(*val);
30587        }
30588        for val in &self.vel_yaw {
30589            __tmp.put_f32_le(*val);
30590        }
30591        for val in &self.command {
30592            __tmp.put_u16_le(*val);
30593        }
30594        __tmp.put_u8(self.valid_points);
30595        if matches!(version, MavlinkVersion::V2) {
30596            let len = __tmp.len();
30597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30598        } else {
30599            __tmp.len()
30600        }
30601    }
30602}
30603#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30604#[doc = ""]
30605#[doc = "ID: 385"]
30606#[derive(Debug, Clone, PartialEq)]
30607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30609#[cfg_attr(feature = "ts", derive(TS))]
30610#[cfg_attr(feature = "ts", ts(export))]
30611pub struct TUNNEL_DATA {
30612    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30613    pub payload_type: MavTunnelPayloadType,
30614    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30615    pub target_system: u8,
30616    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30617    pub target_component: u8,
30618    #[doc = "Length of the data transported in payload"]
30619    pub payload_length: u8,
30620    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30622    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30623    pub payload: [u8; 128],
30624}
30625impl TUNNEL_DATA {
30626    pub const ENCODED_LEN: usize = 133usize;
30627    pub const DEFAULT: Self = Self {
30628        payload_type: MavTunnelPayloadType::DEFAULT,
30629        target_system: 0_u8,
30630        target_component: 0_u8,
30631        payload_length: 0_u8,
30632        payload: [0_u8; 128usize],
30633    };
30634    #[cfg(feature = "arbitrary")]
30635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30636        use arbitrary::{Arbitrary, Unstructured};
30637        let mut buf = [0u8; 1024];
30638        rng.fill_bytes(&mut buf);
30639        let mut unstructured = Unstructured::new(&buf);
30640        Self::arbitrary(&mut unstructured).unwrap_or_default()
30641    }
30642}
30643impl Default for TUNNEL_DATA {
30644    fn default() -> Self {
30645        Self::DEFAULT.clone()
30646    }
30647}
30648impl MessageData for TUNNEL_DATA {
30649    type Message = MavMessage;
30650    const ID: u32 = 385u32;
30651    const NAME: &'static str = "TUNNEL";
30652    const EXTRA_CRC: u8 = 147u8;
30653    const ENCODED_LEN: usize = 133usize;
30654    fn deser(
30655        _version: MavlinkVersion,
30656        __input: &[u8],
30657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30658        let avail_len = __input.len();
30659        let mut payload_buf = [0; Self::ENCODED_LEN];
30660        let mut buf = if avail_len < Self::ENCODED_LEN {
30661            payload_buf[0..avail_len].copy_from_slice(__input);
30662            Bytes::new(&payload_buf)
30663        } else {
30664            Bytes::new(__input)
30665        };
30666        let mut __struct = Self::default();
30667        let tmp = buf.get_u16_le();
30668        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30669            ::mavlink_core::error::ParserError::InvalidEnum {
30670                enum_type: "MavTunnelPayloadType",
30671                value: tmp as u32,
30672            },
30673        )?;
30674        __struct.target_system = buf.get_u8();
30675        __struct.target_component = buf.get_u8();
30676        __struct.payload_length = buf.get_u8();
30677        for v in &mut __struct.payload {
30678            let val = buf.get_u8();
30679            *v = val;
30680        }
30681        Ok(__struct)
30682    }
30683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30684        let mut __tmp = BytesMut::new(bytes);
30685        #[allow(clippy::absurd_extreme_comparisons)]
30686        #[allow(unused_comparisons)]
30687        if __tmp.remaining() < Self::ENCODED_LEN {
30688            panic!(
30689                "buffer is too small (need {} bytes, but got {})",
30690                Self::ENCODED_LEN,
30691                __tmp.remaining(),
30692            )
30693        }
30694        __tmp.put_u16_le(self.payload_type as u16);
30695        __tmp.put_u8(self.target_system);
30696        __tmp.put_u8(self.target_component);
30697        __tmp.put_u8(self.payload_length);
30698        for val in &self.payload {
30699            __tmp.put_u8(*val);
30700        }
30701        if matches!(version, MavlinkVersion::V2) {
30702            let len = __tmp.len();
30703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30704        } else {
30705            __tmp.len()
30706        }
30707    }
30708}
30709#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30710#[doc = ""]
30711#[doc = "ID: 311"]
30712#[derive(Debug, Clone, PartialEq)]
30713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30715#[cfg_attr(feature = "ts", derive(TS))]
30716#[cfg_attr(feature = "ts", ts(export))]
30717pub struct UAVCAN_NODE_INFO_DATA {
30718    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30719    pub time_usec: u64,
30720    #[doc = "Time since the start-up of the node."]
30721    pub uptime_sec: u32,
30722    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30723    pub sw_vcs_commit: u32,
30724    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30725    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30726    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30727    pub name: [u8; 80],
30728    #[doc = "Hardware major version number."]
30729    pub hw_version_major: u8,
30730    #[doc = "Hardware minor version number."]
30731    pub hw_version_minor: u8,
30732    #[doc = "Hardware unique 128-bit ID."]
30733    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30734    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30735    pub hw_unique_id: [u8; 16],
30736    #[doc = "Software major version number."]
30737    pub sw_version_major: u8,
30738    #[doc = "Software minor version number."]
30739    pub sw_version_minor: u8,
30740}
30741impl UAVCAN_NODE_INFO_DATA {
30742    pub const ENCODED_LEN: usize = 116usize;
30743    pub const DEFAULT: Self = Self {
30744        time_usec: 0_u64,
30745        uptime_sec: 0_u32,
30746        sw_vcs_commit: 0_u32,
30747        name: [0_u8; 80usize],
30748        hw_version_major: 0_u8,
30749        hw_version_minor: 0_u8,
30750        hw_unique_id: [0_u8; 16usize],
30751        sw_version_major: 0_u8,
30752        sw_version_minor: 0_u8,
30753    };
30754    #[cfg(feature = "arbitrary")]
30755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30756        use arbitrary::{Arbitrary, Unstructured};
30757        let mut buf = [0u8; 1024];
30758        rng.fill_bytes(&mut buf);
30759        let mut unstructured = Unstructured::new(&buf);
30760        Self::arbitrary(&mut unstructured).unwrap_or_default()
30761    }
30762}
30763impl Default for UAVCAN_NODE_INFO_DATA {
30764    fn default() -> Self {
30765        Self::DEFAULT.clone()
30766    }
30767}
30768impl MessageData for UAVCAN_NODE_INFO_DATA {
30769    type Message = MavMessage;
30770    const ID: u32 = 311u32;
30771    const NAME: &'static str = "UAVCAN_NODE_INFO";
30772    const EXTRA_CRC: u8 = 95u8;
30773    const ENCODED_LEN: usize = 116usize;
30774    fn deser(
30775        _version: MavlinkVersion,
30776        __input: &[u8],
30777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30778        let avail_len = __input.len();
30779        let mut payload_buf = [0; Self::ENCODED_LEN];
30780        let mut buf = if avail_len < Self::ENCODED_LEN {
30781            payload_buf[0..avail_len].copy_from_slice(__input);
30782            Bytes::new(&payload_buf)
30783        } else {
30784            Bytes::new(__input)
30785        };
30786        let mut __struct = Self::default();
30787        __struct.time_usec = buf.get_u64_le();
30788        __struct.uptime_sec = buf.get_u32_le();
30789        __struct.sw_vcs_commit = buf.get_u32_le();
30790        for v in &mut __struct.name {
30791            let val = buf.get_u8();
30792            *v = val;
30793        }
30794        __struct.hw_version_major = buf.get_u8();
30795        __struct.hw_version_minor = buf.get_u8();
30796        for v in &mut __struct.hw_unique_id {
30797            let val = buf.get_u8();
30798            *v = val;
30799        }
30800        __struct.sw_version_major = buf.get_u8();
30801        __struct.sw_version_minor = buf.get_u8();
30802        Ok(__struct)
30803    }
30804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30805        let mut __tmp = BytesMut::new(bytes);
30806        #[allow(clippy::absurd_extreme_comparisons)]
30807        #[allow(unused_comparisons)]
30808        if __tmp.remaining() < Self::ENCODED_LEN {
30809            panic!(
30810                "buffer is too small (need {} bytes, but got {})",
30811                Self::ENCODED_LEN,
30812                __tmp.remaining(),
30813            )
30814        }
30815        __tmp.put_u64_le(self.time_usec);
30816        __tmp.put_u32_le(self.uptime_sec);
30817        __tmp.put_u32_le(self.sw_vcs_commit);
30818        for val in &self.name {
30819            __tmp.put_u8(*val);
30820        }
30821        __tmp.put_u8(self.hw_version_major);
30822        __tmp.put_u8(self.hw_version_minor);
30823        for val in &self.hw_unique_id {
30824            __tmp.put_u8(*val);
30825        }
30826        __tmp.put_u8(self.sw_version_major);
30827        __tmp.put_u8(self.sw_version_minor);
30828        if matches!(version, MavlinkVersion::V2) {
30829            let len = __tmp.len();
30830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30831        } else {
30832            __tmp.len()
30833        }
30834    }
30835}
30836#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30837#[doc = ""]
30838#[doc = "ID: 310"]
30839#[derive(Debug, Clone, PartialEq)]
30840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30842#[cfg_attr(feature = "ts", derive(TS))]
30843#[cfg_attr(feature = "ts", ts(export))]
30844pub struct UAVCAN_NODE_STATUS_DATA {
30845    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30846    pub time_usec: u64,
30847    #[doc = "Time since the start-up of the node."]
30848    pub uptime_sec: u32,
30849    #[doc = "Vendor-specific status information."]
30850    pub vendor_specific_status_code: u16,
30851    #[doc = "Generalized node health status."]
30852    pub health: UavcanNodeHealth,
30853    #[doc = "Generalized operating mode."]
30854    pub mode: UavcanNodeMode,
30855    #[doc = "Not used currently."]
30856    pub sub_mode: u8,
30857}
30858impl UAVCAN_NODE_STATUS_DATA {
30859    pub const ENCODED_LEN: usize = 17usize;
30860    pub const DEFAULT: Self = Self {
30861        time_usec: 0_u64,
30862        uptime_sec: 0_u32,
30863        vendor_specific_status_code: 0_u16,
30864        health: UavcanNodeHealth::DEFAULT,
30865        mode: UavcanNodeMode::DEFAULT,
30866        sub_mode: 0_u8,
30867    };
30868    #[cfg(feature = "arbitrary")]
30869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30870        use arbitrary::{Arbitrary, Unstructured};
30871        let mut buf = [0u8; 1024];
30872        rng.fill_bytes(&mut buf);
30873        let mut unstructured = Unstructured::new(&buf);
30874        Self::arbitrary(&mut unstructured).unwrap_or_default()
30875    }
30876}
30877impl Default for UAVCAN_NODE_STATUS_DATA {
30878    fn default() -> Self {
30879        Self::DEFAULT.clone()
30880    }
30881}
30882impl MessageData for UAVCAN_NODE_STATUS_DATA {
30883    type Message = MavMessage;
30884    const ID: u32 = 310u32;
30885    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30886    const EXTRA_CRC: u8 = 28u8;
30887    const ENCODED_LEN: usize = 17usize;
30888    fn deser(
30889        _version: MavlinkVersion,
30890        __input: &[u8],
30891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30892        let avail_len = __input.len();
30893        let mut payload_buf = [0; Self::ENCODED_LEN];
30894        let mut buf = if avail_len < Self::ENCODED_LEN {
30895            payload_buf[0..avail_len].copy_from_slice(__input);
30896            Bytes::new(&payload_buf)
30897        } else {
30898            Bytes::new(__input)
30899        };
30900        let mut __struct = Self::default();
30901        __struct.time_usec = buf.get_u64_le();
30902        __struct.uptime_sec = buf.get_u32_le();
30903        __struct.vendor_specific_status_code = buf.get_u16_le();
30904        let tmp = buf.get_u8();
30905        __struct.health =
30906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30907                enum_type: "UavcanNodeHealth",
30908                value: tmp as u32,
30909            })?;
30910        let tmp = buf.get_u8();
30911        __struct.mode =
30912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30913                enum_type: "UavcanNodeMode",
30914                value: tmp as u32,
30915            })?;
30916        __struct.sub_mode = buf.get_u8();
30917        Ok(__struct)
30918    }
30919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30920        let mut __tmp = BytesMut::new(bytes);
30921        #[allow(clippy::absurd_extreme_comparisons)]
30922        #[allow(unused_comparisons)]
30923        if __tmp.remaining() < Self::ENCODED_LEN {
30924            panic!(
30925                "buffer is too small (need {} bytes, but got {})",
30926                Self::ENCODED_LEN,
30927                __tmp.remaining(),
30928            )
30929        }
30930        __tmp.put_u64_le(self.time_usec);
30931        __tmp.put_u32_le(self.uptime_sec);
30932        __tmp.put_u16_le(self.vendor_specific_status_code);
30933        __tmp.put_u8(self.health as u8);
30934        __tmp.put_u8(self.mode as u8);
30935        __tmp.put_u8(self.sub_mode);
30936        if matches!(version, MavlinkVersion::V2) {
30937            let len = __tmp.len();
30938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30939        } else {
30940            __tmp.len()
30941        }
30942    }
30943}
30944#[doc = "The global position resulting from GPS and sensor fusion."]
30945#[doc = ""]
30946#[doc = "ID: 340"]
30947#[derive(Debug, Clone, PartialEq)]
30948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30950#[cfg_attr(feature = "ts", derive(TS))]
30951#[cfg_attr(feature = "ts", ts(export))]
30952pub struct UTM_GLOBAL_POSITION_DATA {
30953    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30954    pub time: u64,
30955    #[doc = "Latitude (WGS84)"]
30956    pub lat: i32,
30957    #[doc = "Longitude (WGS84)"]
30958    pub lon: i32,
30959    #[doc = "Altitude (WGS84)"]
30960    pub alt: i32,
30961    #[doc = "Altitude above ground"]
30962    pub relative_alt: i32,
30963    #[doc = "Next waypoint, latitude (WGS84)"]
30964    pub next_lat: i32,
30965    #[doc = "Next waypoint, longitude (WGS84)"]
30966    pub next_lon: i32,
30967    #[doc = "Next waypoint, altitude (WGS84)"]
30968    pub next_alt: i32,
30969    #[doc = "Ground X speed (latitude, positive north)"]
30970    pub vx: i16,
30971    #[doc = "Ground Y speed (longitude, positive east)"]
30972    pub vy: i16,
30973    #[doc = "Ground Z speed (altitude, positive down)"]
30974    pub vz: i16,
30975    #[doc = "Horizontal position uncertainty (standard deviation)"]
30976    pub h_acc: u16,
30977    #[doc = "Altitude uncertainty (standard deviation)"]
30978    pub v_acc: u16,
30979    #[doc = "Speed uncertainty (standard deviation)"]
30980    pub vel_acc: u16,
30981    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30982    pub update_rate: u16,
30983    #[doc = "Unique UAS ID."]
30984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30985    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30986    pub uas_id: [u8; 18],
30987    #[doc = "Flight state"]
30988    pub flight_state: UtmFlightState,
30989    #[doc = "Bitwise OR combination of the data available flags."]
30990    pub flags: UtmDataAvailFlags,
30991}
30992impl UTM_GLOBAL_POSITION_DATA {
30993    pub const ENCODED_LEN: usize = 70usize;
30994    pub const DEFAULT: Self = Self {
30995        time: 0_u64,
30996        lat: 0_i32,
30997        lon: 0_i32,
30998        alt: 0_i32,
30999        relative_alt: 0_i32,
31000        next_lat: 0_i32,
31001        next_lon: 0_i32,
31002        next_alt: 0_i32,
31003        vx: 0_i16,
31004        vy: 0_i16,
31005        vz: 0_i16,
31006        h_acc: 0_u16,
31007        v_acc: 0_u16,
31008        vel_acc: 0_u16,
31009        update_rate: 0_u16,
31010        uas_id: [0_u8; 18usize],
31011        flight_state: UtmFlightState::DEFAULT,
31012        flags: UtmDataAvailFlags::DEFAULT,
31013    };
31014    #[cfg(feature = "arbitrary")]
31015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31016        use arbitrary::{Arbitrary, Unstructured};
31017        let mut buf = [0u8; 1024];
31018        rng.fill_bytes(&mut buf);
31019        let mut unstructured = Unstructured::new(&buf);
31020        Self::arbitrary(&mut unstructured).unwrap_or_default()
31021    }
31022}
31023impl Default for UTM_GLOBAL_POSITION_DATA {
31024    fn default() -> Self {
31025        Self::DEFAULT.clone()
31026    }
31027}
31028impl MessageData for UTM_GLOBAL_POSITION_DATA {
31029    type Message = MavMessage;
31030    const ID: u32 = 340u32;
31031    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31032    const EXTRA_CRC: u8 = 99u8;
31033    const ENCODED_LEN: usize = 70usize;
31034    fn deser(
31035        _version: MavlinkVersion,
31036        __input: &[u8],
31037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31038        let avail_len = __input.len();
31039        let mut payload_buf = [0; Self::ENCODED_LEN];
31040        let mut buf = if avail_len < Self::ENCODED_LEN {
31041            payload_buf[0..avail_len].copy_from_slice(__input);
31042            Bytes::new(&payload_buf)
31043        } else {
31044            Bytes::new(__input)
31045        };
31046        let mut __struct = Self::default();
31047        __struct.time = buf.get_u64_le();
31048        __struct.lat = buf.get_i32_le();
31049        __struct.lon = buf.get_i32_le();
31050        __struct.alt = buf.get_i32_le();
31051        __struct.relative_alt = buf.get_i32_le();
31052        __struct.next_lat = buf.get_i32_le();
31053        __struct.next_lon = buf.get_i32_le();
31054        __struct.next_alt = buf.get_i32_le();
31055        __struct.vx = buf.get_i16_le();
31056        __struct.vy = buf.get_i16_le();
31057        __struct.vz = buf.get_i16_le();
31058        __struct.h_acc = buf.get_u16_le();
31059        __struct.v_acc = buf.get_u16_le();
31060        __struct.vel_acc = buf.get_u16_le();
31061        __struct.update_rate = buf.get_u16_le();
31062        for v in &mut __struct.uas_id {
31063            let val = buf.get_u8();
31064            *v = val;
31065        }
31066        let tmp = buf.get_u8();
31067        __struct.flight_state =
31068            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31069                enum_type: "UtmFlightState",
31070                value: tmp as u32,
31071            })?;
31072        let tmp = buf.get_u8();
31073        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
31074            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31075                flag_type: "UtmDataAvailFlags",
31076                value: tmp as u32,
31077            })?;
31078        Ok(__struct)
31079    }
31080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31081        let mut __tmp = BytesMut::new(bytes);
31082        #[allow(clippy::absurd_extreme_comparisons)]
31083        #[allow(unused_comparisons)]
31084        if __tmp.remaining() < Self::ENCODED_LEN {
31085            panic!(
31086                "buffer is too small (need {} bytes, but got {})",
31087                Self::ENCODED_LEN,
31088                __tmp.remaining(),
31089            )
31090        }
31091        __tmp.put_u64_le(self.time);
31092        __tmp.put_i32_le(self.lat);
31093        __tmp.put_i32_le(self.lon);
31094        __tmp.put_i32_le(self.alt);
31095        __tmp.put_i32_le(self.relative_alt);
31096        __tmp.put_i32_le(self.next_lat);
31097        __tmp.put_i32_le(self.next_lon);
31098        __tmp.put_i32_le(self.next_alt);
31099        __tmp.put_i16_le(self.vx);
31100        __tmp.put_i16_le(self.vy);
31101        __tmp.put_i16_le(self.vz);
31102        __tmp.put_u16_le(self.h_acc);
31103        __tmp.put_u16_le(self.v_acc);
31104        __tmp.put_u16_le(self.vel_acc);
31105        __tmp.put_u16_le(self.update_rate);
31106        for val in &self.uas_id {
31107            __tmp.put_u8(*val);
31108        }
31109        __tmp.put_u8(self.flight_state as u8);
31110        __tmp.put_u8(self.flags.bits());
31111        if matches!(version, MavlinkVersion::V2) {
31112            let len = __tmp.len();
31113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31114        } else {
31115            __tmp.len()
31116        }
31117    }
31118}
31119#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31120#[doc = ""]
31121#[doc = "ID: 248"]
31122#[derive(Debug, Clone, PartialEq)]
31123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31125#[cfg_attr(feature = "ts", derive(TS))]
31126#[cfg_attr(feature = "ts", ts(export))]
31127pub struct V2_EXTENSION_DATA {
31128    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31129    pub message_type: u16,
31130    #[doc = "Network ID (0 for broadcast)"]
31131    pub target_network: u8,
31132    #[doc = "System ID (0 for broadcast)"]
31133    pub target_system: u8,
31134    #[doc = "Component ID (0 for broadcast)"]
31135    pub target_component: u8,
31136    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31138    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31139    pub payload: [u8; 249],
31140}
31141impl V2_EXTENSION_DATA {
31142    pub const ENCODED_LEN: usize = 254usize;
31143    pub const DEFAULT: Self = Self {
31144        message_type: 0_u16,
31145        target_network: 0_u8,
31146        target_system: 0_u8,
31147        target_component: 0_u8,
31148        payload: [0_u8; 249usize],
31149    };
31150    #[cfg(feature = "arbitrary")]
31151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31152        use arbitrary::{Arbitrary, Unstructured};
31153        let mut buf = [0u8; 1024];
31154        rng.fill_bytes(&mut buf);
31155        let mut unstructured = Unstructured::new(&buf);
31156        Self::arbitrary(&mut unstructured).unwrap_or_default()
31157    }
31158}
31159impl Default for V2_EXTENSION_DATA {
31160    fn default() -> Self {
31161        Self::DEFAULT.clone()
31162    }
31163}
31164impl MessageData for V2_EXTENSION_DATA {
31165    type Message = MavMessage;
31166    const ID: u32 = 248u32;
31167    const NAME: &'static str = "V2_EXTENSION";
31168    const EXTRA_CRC: u8 = 8u8;
31169    const ENCODED_LEN: usize = 254usize;
31170    fn deser(
31171        _version: MavlinkVersion,
31172        __input: &[u8],
31173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31174        let avail_len = __input.len();
31175        let mut payload_buf = [0; Self::ENCODED_LEN];
31176        let mut buf = if avail_len < Self::ENCODED_LEN {
31177            payload_buf[0..avail_len].copy_from_slice(__input);
31178            Bytes::new(&payload_buf)
31179        } else {
31180            Bytes::new(__input)
31181        };
31182        let mut __struct = Self::default();
31183        __struct.message_type = buf.get_u16_le();
31184        __struct.target_network = buf.get_u8();
31185        __struct.target_system = buf.get_u8();
31186        __struct.target_component = buf.get_u8();
31187        for v in &mut __struct.payload {
31188            let val = buf.get_u8();
31189            *v = val;
31190        }
31191        Ok(__struct)
31192    }
31193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31194        let mut __tmp = BytesMut::new(bytes);
31195        #[allow(clippy::absurd_extreme_comparisons)]
31196        #[allow(unused_comparisons)]
31197        if __tmp.remaining() < Self::ENCODED_LEN {
31198            panic!(
31199                "buffer is too small (need {} bytes, but got {})",
31200                Self::ENCODED_LEN,
31201                __tmp.remaining(),
31202            )
31203        }
31204        __tmp.put_u16_le(self.message_type);
31205        __tmp.put_u8(self.target_network);
31206        __tmp.put_u8(self.target_system);
31207        __tmp.put_u8(self.target_component);
31208        for val in &self.payload {
31209            __tmp.put_u8(*val);
31210        }
31211        if matches!(version, MavlinkVersion::V2) {
31212            let len = __tmp.len();
31213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31214        } else {
31215            __tmp.len()
31216        }
31217    }
31218}
31219#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31220#[doc = ""]
31221#[doc = "ID: 74"]
31222#[derive(Debug, Clone, PartialEq)]
31223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31225#[cfg_attr(feature = "ts", derive(TS))]
31226#[cfg_attr(feature = "ts", ts(export))]
31227pub struct VFR_HUD_DATA {
31228    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31229    pub airspeed: f32,
31230    #[doc = "Current ground speed."]
31231    pub groundspeed: f32,
31232    #[doc = "Current altitude (MSL)."]
31233    pub alt: f32,
31234    #[doc = "Current climb rate."]
31235    pub climb: f32,
31236    #[doc = "Current heading in compass units (0-360, 0=north)."]
31237    pub heading: i16,
31238    #[doc = "Current throttle setting (0 to 100)."]
31239    pub throttle: u16,
31240}
31241impl VFR_HUD_DATA {
31242    pub const ENCODED_LEN: usize = 20usize;
31243    pub const DEFAULT: Self = Self {
31244        airspeed: 0.0_f32,
31245        groundspeed: 0.0_f32,
31246        alt: 0.0_f32,
31247        climb: 0.0_f32,
31248        heading: 0_i16,
31249        throttle: 0_u16,
31250    };
31251    #[cfg(feature = "arbitrary")]
31252    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31253        use arbitrary::{Arbitrary, Unstructured};
31254        let mut buf = [0u8; 1024];
31255        rng.fill_bytes(&mut buf);
31256        let mut unstructured = Unstructured::new(&buf);
31257        Self::arbitrary(&mut unstructured).unwrap_or_default()
31258    }
31259}
31260impl Default for VFR_HUD_DATA {
31261    fn default() -> Self {
31262        Self::DEFAULT.clone()
31263    }
31264}
31265impl MessageData for VFR_HUD_DATA {
31266    type Message = MavMessage;
31267    const ID: u32 = 74u32;
31268    const NAME: &'static str = "VFR_HUD";
31269    const EXTRA_CRC: u8 = 20u8;
31270    const ENCODED_LEN: usize = 20usize;
31271    fn deser(
31272        _version: MavlinkVersion,
31273        __input: &[u8],
31274    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31275        let avail_len = __input.len();
31276        let mut payload_buf = [0; Self::ENCODED_LEN];
31277        let mut buf = if avail_len < Self::ENCODED_LEN {
31278            payload_buf[0..avail_len].copy_from_slice(__input);
31279            Bytes::new(&payload_buf)
31280        } else {
31281            Bytes::new(__input)
31282        };
31283        let mut __struct = Self::default();
31284        __struct.airspeed = buf.get_f32_le();
31285        __struct.groundspeed = buf.get_f32_le();
31286        __struct.alt = buf.get_f32_le();
31287        __struct.climb = buf.get_f32_le();
31288        __struct.heading = buf.get_i16_le();
31289        __struct.throttle = buf.get_u16_le();
31290        Ok(__struct)
31291    }
31292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31293        let mut __tmp = BytesMut::new(bytes);
31294        #[allow(clippy::absurd_extreme_comparisons)]
31295        #[allow(unused_comparisons)]
31296        if __tmp.remaining() < Self::ENCODED_LEN {
31297            panic!(
31298                "buffer is too small (need {} bytes, but got {})",
31299                Self::ENCODED_LEN,
31300                __tmp.remaining(),
31301            )
31302        }
31303        __tmp.put_f32_le(self.airspeed);
31304        __tmp.put_f32_le(self.groundspeed);
31305        __tmp.put_f32_le(self.alt);
31306        __tmp.put_f32_le(self.climb);
31307        __tmp.put_i16_le(self.heading);
31308        __tmp.put_u16_le(self.throttle);
31309        if matches!(version, MavlinkVersion::V2) {
31310            let len = __tmp.len();
31311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31312        } else {
31313            __tmp.len()
31314        }
31315    }
31316}
31317#[doc = "Vibration levels and accelerometer clipping."]
31318#[doc = ""]
31319#[doc = "ID: 241"]
31320#[derive(Debug, Clone, PartialEq)]
31321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31323#[cfg_attr(feature = "ts", derive(TS))]
31324#[cfg_attr(feature = "ts", ts(export))]
31325pub struct VIBRATION_DATA {
31326    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31327    pub time_usec: u64,
31328    #[doc = "Vibration levels on X-axis"]
31329    pub vibration_x: f32,
31330    #[doc = "Vibration levels on Y-axis"]
31331    pub vibration_y: f32,
31332    #[doc = "Vibration levels on Z-axis"]
31333    pub vibration_z: f32,
31334    #[doc = "first accelerometer clipping count"]
31335    pub clipping_0: u32,
31336    #[doc = "second accelerometer clipping count"]
31337    pub clipping_1: u32,
31338    #[doc = "third accelerometer clipping count"]
31339    pub clipping_2: u32,
31340}
31341impl VIBRATION_DATA {
31342    pub const ENCODED_LEN: usize = 32usize;
31343    pub const DEFAULT: Self = Self {
31344        time_usec: 0_u64,
31345        vibration_x: 0.0_f32,
31346        vibration_y: 0.0_f32,
31347        vibration_z: 0.0_f32,
31348        clipping_0: 0_u32,
31349        clipping_1: 0_u32,
31350        clipping_2: 0_u32,
31351    };
31352    #[cfg(feature = "arbitrary")]
31353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31354        use arbitrary::{Arbitrary, Unstructured};
31355        let mut buf = [0u8; 1024];
31356        rng.fill_bytes(&mut buf);
31357        let mut unstructured = Unstructured::new(&buf);
31358        Self::arbitrary(&mut unstructured).unwrap_or_default()
31359    }
31360}
31361impl Default for VIBRATION_DATA {
31362    fn default() -> Self {
31363        Self::DEFAULT.clone()
31364    }
31365}
31366impl MessageData for VIBRATION_DATA {
31367    type Message = MavMessage;
31368    const ID: u32 = 241u32;
31369    const NAME: &'static str = "VIBRATION";
31370    const EXTRA_CRC: u8 = 90u8;
31371    const ENCODED_LEN: usize = 32usize;
31372    fn deser(
31373        _version: MavlinkVersion,
31374        __input: &[u8],
31375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31376        let avail_len = __input.len();
31377        let mut payload_buf = [0; Self::ENCODED_LEN];
31378        let mut buf = if avail_len < Self::ENCODED_LEN {
31379            payload_buf[0..avail_len].copy_from_slice(__input);
31380            Bytes::new(&payload_buf)
31381        } else {
31382            Bytes::new(__input)
31383        };
31384        let mut __struct = Self::default();
31385        __struct.time_usec = buf.get_u64_le();
31386        __struct.vibration_x = buf.get_f32_le();
31387        __struct.vibration_y = buf.get_f32_le();
31388        __struct.vibration_z = buf.get_f32_le();
31389        __struct.clipping_0 = buf.get_u32_le();
31390        __struct.clipping_1 = buf.get_u32_le();
31391        __struct.clipping_2 = buf.get_u32_le();
31392        Ok(__struct)
31393    }
31394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31395        let mut __tmp = BytesMut::new(bytes);
31396        #[allow(clippy::absurd_extreme_comparisons)]
31397        #[allow(unused_comparisons)]
31398        if __tmp.remaining() < Self::ENCODED_LEN {
31399            panic!(
31400                "buffer is too small (need {} bytes, but got {})",
31401                Self::ENCODED_LEN,
31402                __tmp.remaining(),
31403            )
31404        }
31405        __tmp.put_u64_le(self.time_usec);
31406        __tmp.put_f32_le(self.vibration_x);
31407        __tmp.put_f32_le(self.vibration_y);
31408        __tmp.put_f32_le(self.vibration_z);
31409        __tmp.put_u32_le(self.clipping_0);
31410        __tmp.put_u32_le(self.clipping_1);
31411        __tmp.put_u32_le(self.clipping_2);
31412        if matches!(version, MavlinkVersion::V2) {
31413            let len = __tmp.len();
31414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31415        } else {
31416            __tmp.len()
31417        }
31418    }
31419}
31420#[doc = "Global position estimate from a Vicon motion system source."]
31421#[doc = ""]
31422#[doc = "ID: 104"]
31423#[derive(Debug, Clone, PartialEq)]
31424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31426#[cfg_attr(feature = "ts", derive(TS))]
31427#[cfg_attr(feature = "ts", ts(export))]
31428pub struct VICON_POSITION_ESTIMATE_DATA {
31429    #[doc = "Timestamp (UNIX time or time since system boot)"]
31430    pub usec: u64,
31431    #[doc = "Global X position"]
31432    pub x: f32,
31433    #[doc = "Global Y position"]
31434    pub y: f32,
31435    #[doc = "Global Z position"]
31436    pub z: f32,
31437    #[doc = "Roll angle"]
31438    pub roll: f32,
31439    #[doc = "Pitch angle"]
31440    pub pitch: f32,
31441    #[doc = "Yaw angle"]
31442    pub yaw: f32,
31443    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31444    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31445    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31446    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31447    pub covariance: [f32; 21],
31448}
31449impl VICON_POSITION_ESTIMATE_DATA {
31450    pub const ENCODED_LEN: usize = 116usize;
31451    pub const DEFAULT: Self = Self {
31452        usec: 0_u64,
31453        x: 0.0_f32,
31454        y: 0.0_f32,
31455        z: 0.0_f32,
31456        roll: 0.0_f32,
31457        pitch: 0.0_f32,
31458        yaw: 0.0_f32,
31459        covariance: [0.0_f32; 21usize],
31460    };
31461    #[cfg(feature = "arbitrary")]
31462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31463        use arbitrary::{Arbitrary, Unstructured};
31464        let mut buf = [0u8; 1024];
31465        rng.fill_bytes(&mut buf);
31466        let mut unstructured = Unstructured::new(&buf);
31467        Self::arbitrary(&mut unstructured).unwrap_or_default()
31468    }
31469}
31470impl Default for VICON_POSITION_ESTIMATE_DATA {
31471    fn default() -> Self {
31472        Self::DEFAULT.clone()
31473    }
31474}
31475impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31476    type Message = MavMessage;
31477    const ID: u32 = 104u32;
31478    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31479    const EXTRA_CRC: u8 = 56u8;
31480    const ENCODED_LEN: usize = 116usize;
31481    fn deser(
31482        _version: MavlinkVersion,
31483        __input: &[u8],
31484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31485        let avail_len = __input.len();
31486        let mut payload_buf = [0; Self::ENCODED_LEN];
31487        let mut buf = if avail_len < Self::ENCODED_LEN {
31488            payload_buf[0..avail_len].copy_from_slice(__input);
31489            Bytes::new(&payload_buf)
31490        } else {
31491            Bytes::new(__input)
31492        };
31493        let mut __struct = Self::default();
31494        __struct.usec = buf.get_u64_le();
31495        __struct.x = buf.get_f32_le();
31496        __struct.y = buf.get_f32_le();
31497        __struct.z = buf.get_f32_le();
31498        __struct.roll = buf.get_f32_le();
31499        __struct.pitch = buf.get_f32_le();
31500        __struct.yaw = buf.get_f32_le();
31501        for v in &mut __struct.covariance {
31502            let val = buf.get_f32_le();
31503            *v = val;
31504        }
31505        Ok(__struct)
31506    }
31507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31508        let mut __tmp = BytesMut::new(bytes);
31509        #[allow(clippy::absurd_extreme_comparisons)]
31510        #[allow(unused_comparisons)]
31511        if __tmp.remaining() < Self::ENCODED_LEN {
31512            panic!(
31513                "buffer is too small (need {} bytes, but got {})",
31514                Self::ENCODED_LEN,
31515                __tmp.remaining(),
31516            )
31517        }
31518        __tmp.put_u64_le(self.usec);
31519        __tmp.put_f32_le(self.x);
31520        __tmp.put_f32_le(self.y);
31521        __tmp.put_f32_le(self.z);
31522        __tmp.put_f32_le(self.roll);
31523        __tmp.put_f32_le(self.pitch);
31524        __tmp.put_f32_le(self.yaw);
31525        if matches!(version, MavlinkVersion::V2) {
31526            for val in &self.covariance {
31527                __tmp.put_f32_le(*val);
31528            }
31529            let len = __tmp.len();
31530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31531        } else {
31532            __tmp.len()
31533        }
31534    }
31535}
31536#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31537#[doc = ""]
31538#[doc = "ID: 269"]
31539#[derive(Debug, Clone, PartialEq)]
31540#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31541#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31542#[cfg_attr(feature = "ts", derive(TS))]
31543#[cfg_attr(feature = "ts", ts(export))]
31544pub struct VIDEO_STREAM_INFORMATION_DATA {
31545    #[doc = "Frame rate."]
31546    pub framerate: f32,
31547    #[doc = "Bit rate."]
31548    pub bitrate: u32,
31549    #[doc = "Bitmap of stream status flags."]
31550    pub flags: VideoStreamStatusFlags,
31551    #[doc = "Horizontal resolution."]
31552    pub resolution_h: u16,
31553    #[doc = "Vertical resolution."]
31554    pub resolution_v: u16,
31555    #[doc = "Video image rotation clockwise."]
31556    pub rotation: u16,
31557    #[doc = "Horizontal Field of view."]
31558    pub hfov: u16,
31559    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31560    pub stream_id: u8,
31561    #[doc = "Number of streams available."]
31562    pub count: u8,
31563    #[doc = "Type of stream."]
31564    pub mavtype: VideoStreamType,
31565    #[doc = "Stream name."]
31566    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31567    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31568    pub name: [u8; 32],
31569    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31570    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31571    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31572    pub uri: [u8; 160],
31573    #[doc = "Encoding of stream."]
31574    #[cfg_attr(feature = "serde", serde(default))]
31575    pub encoding: VideoStreamEncoding,
31576    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31577    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31578    pub camera_device_id: u8,
31579}
31580impl VIDEO_STREAM_INFORMATION_DATA {
31581    pub const ENCODED_LEN: usize = 215usize;
31582    pub const DEFAULT: Self = Self {
31583        framerate: 0.0_f32,
31584        bitrate: 0_u32,
31585        flags: VideoStreamStatusFlags::DEFAULT,
31586        resolution_h: 0_u16,
31587        resolution_v: 0_u16,
31588        rotation: 0_u16,
31589        hfov: 0_u16,
31590        stream_id: 0_u8,
31591        count: 0_u8,
31592        mavtype: VideoStreamType::DEFAULT,
31593        name: [0_u8; 32usize],
31594        uri: [0_u8; 160usize],
31595        encoding: VideoStreamEncoding::DEFAULT,
31596        camera_device_id: 0_u8,
31597    };
31598    #[cfg(feature = "arbitrary")]
31599    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31600        use arbitrary::{Arbitrary, Unstructured};
31601        let mut buf = [0u8; 1024];
31602        rng.fill_bytes(&mut buf);
31603        let mut unstructured = Unstructured::new(&buf);
31604        Self::arbitrary(&mut unstructured).unwrap_or_default()
31605    }
31606}
31607impl Default for VIDEO_STREAM_INFORMATION_DATA {
31608    fn default() -> Self {
31609        Self::DEFAULT.clone()
31610    }
31611}
31612impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31613    type Message = MavMessage;
31614    const ID: u32 = 269u32;
31615    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31616    const EXTRA_CRC: u8 = 109u8;
31617    const ENCODED_LEN: usize = 215usize;
31618    fn deser(
31619        _version: MavlinkVersion,
31620        __input: &[u8],
31621    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31622        let avail_len = __input.len();
31623        let mut payload_buf = [0; Self::ENCODED_LEN];
31624        let mut buf = if avail_len < Self::ENCODED_LEN {
31625            payload_buf[0..avail_len].copy_from_slice(__input);
31626            Bytes::new(&payload_buf)
31627        } else {
31628            Bytes::new(__input)
31629        };
31630        let mut __struct = Self::default();
31631        __struct.framerate = buf.get_f32_le();
31632        __struct.bitrate = buf.get_u32_le();
31633        let tmp = buf.get_u16_le();
31634        __struct.flags = VideoStreamStatusFlags::from_bits(
31635            tmp & VideoStreamStatusFlags::all().bits(),
31636        )
31637        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31638            flag_type: "VideoStreamStatusFlags",
31639            value: tmp as u32,
31640        })?;
31641        __struct.resolution_h = buf.get_u16_le();
31642        __struct.resolution_v = buf.get_u16_le();
31643        __struct.rotation = buf.get_u16_le();
31644        __struct.hfov = buf.get_u16_le();
31645        __struct.stream_id = buf.get_u8();
31646        __struct.count = buf.get_u8();
31647        let tmp = buf.get_u8();
31648        __struct.mavtype =
31649            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31650                enum_type: "VideoStreamType",
31651                value: tmp as u32,
31652            })?;
31653        for v in &mut __struct.name {
31654            let val = buf.get_u8();
31655            *v = val;
31656        }
31657        for v in &mut __struct.uri {
31658            let val = buf.get_u8();
31659            *v = val;
31660        }
31661        let tmp = buf.get_u8();
31662        __struct.encoding =
31663            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31664                enum_type: "VideoStreamEncoding",
31665                value: tmp as u32,
31666            })?;
31667        __struct.camera_device_id = buf.get_u8();
31668        Ok(__struct)
31669    }
31670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31671        let mut __tmp = BytesMut::new(bytes);
31672        #[allow(clippy::absurd_extreme_comparisons)]
31673        #[allow(unused_comparisons)]
31674        if __tmp.remaining() < Self::ENCODED_LEN {
31675            panic!(
31676                "buffer is too small (need {} bytes, but got {})",
31677                Self::ENCODED_LEN,
31678                __tmp.remaining(),
31679            )
31680        }
31681        __tmp.put_f32_le(self.framerate);
31682        __tmp.put_u32_le(self.bitrate);
31683        __tmp.put_u16_le(self.flags.bits());
31684        __tmp.put_u16_le(self.resolution_h);
31685        __tmp.put_u16_le(self.resolution_v);
31686        __tmp.put_u16_le(self.rotation);
31687        __tmp.put_u16_le(self.hfov);
31688        __tmp.put_u8(self.stream_id);
31689        __tmp.put_u8(self.count);
31690        __tmp.put_u8(self.mavtype as u8);
31691        for val in &self.name {
31692            __tmp.put_u8(*val);
31693        }
31694        for val in &self.uri {
31695            __tmp.put_u8(*val);
31696        }
31697        if matches!(version, MavlinkVersion::V2) {
31698            __tmp.put_u8(self.encoding as u8);
31699            __tmp.put_u8(self.camera_device_id);
31700            let len = __tmp.len();
31701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31702        } else {
31703            __tmp.len()
31704        }
31705    }
31706}
31707#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31708#[doc = ""]
31709#[doc = "ID: 270"]
31710#[derive(Debug, Clone, PartialEq)]
31711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31713#[cfg_attr(feature = "ts", derive(TS))]
31714#[cfg_attr(feature = "ts", ts(export))]
31715pub struct VIDEO_STREAM_STATUS_DATA {
31716    #[doc = "Frame rate"]
31717    pub framerate: f32,
31718    #[doc = "Bit rate"]
31719    pub bitrate: u32,
31720    #[doc = "Bitmap of stream status flags"]
31721    pub flags: VideoStreamStatusFlags,
31722    #[doc = "Horizontal resolution"]
31723    pub resolution_h: u16,
31724    #[doc = "Vertical resolution"]
31725    pub resolution_v: u16,
31726    #[doc = "Video image rotation clockwise"]
31727    pub rotation: u16,
31728    #[doc = "Horizontal Field of view"]
31729    pub hfov: u16,
31730    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31731    pub stream_id: u8,
31732    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31733    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31734    pub camera_device_id: u8,
31735}
31736impl VIDEO_STREAM_STATUS_DATA {
31737    pub const ENCODED_LEN: usize = 20usize;
31738    pub const DEFAULT: Self = Self {
31739        framerate: 0.0_f32,
31740        bitrate: 0_u32,
31741        flags: VideoStreamStatusFlags::DEFAULT,
31742        resolution_h: 0_u16,
31743        resolution_v: 0_u16,
31744        rotation: 0_u16,
31745        hfov: 0_u16,
31746        stream_id: 0_u8,
31747        camera_device_id: 0_u8,
31748    };
31749    #[cfg(feature = "arbitrary")]
31750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31751        use arbitrary::{Arbitrary, Unstructured};
31752        let mut buf = [0u8; 1024];
31753        rng.fill_bytes(&mut buf);
31754        let mut unstructured = Unstructured::new(&buf);
31755        Self::arbitrary(&mut unstructured).unwrap_or_default()
31756    }
31757}
31758impl Default for VIDEO_STREAM_STATUS_DATA {
31759    fn default() -> Self {
31760        Self::DEFAULT.clone()
31761    }
31762}
31763impl MessageData for VIDEO_STREAM_STATUS_DATA {
31764    type Message = MavMessage;
31765    const ID: u32 = 270u32;
31766    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31767    const EXTRA_CRC: u8 = 59u8;
31768    const ENCODED_LEN: usize = 20usize;
31769    fn deser(
31770        _version: MavlinkVersion,
31771        __input: &[u8],
31772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31773        let avail_len = __input.len();
31774        let mut payload_buf = [0; Self::ENCODED_LEN];
31775        let mut buf = if avail_len < Self::ENCODED_LEN {
31776            payload_buf[0..avail_len].copy_from_slice(__input);
31777            Bytes::new(&payload_buf)
31778        } else {
31779            Bytes::new(__input)
31780        };
31781        let mut __struct = Self::default();
31782        __struct.framerate = buf.get_f32_le();
31783        __struct.bitrate = buf.get_u32_le();
31784        let tmp = buf.get_u16_le();
31785        __struct.flags = VideoStreamStatusFlags::from_bits(
31786            tmp & VideoStreamStatusFlags::all().bits(),
31787        )
31788        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31789            flag_type: "VideoStreamStatusFlags",
31790            value: tmp as u32,
31791        })?;
31792        __struct.resolution_h = buf.get_u16_le();
31793        __struct.resolution_v = buf.get_u16_le();
31794        __struct.rotation = buf.get_u16_le();
31795        __struct.hfov = buf.get_u16_le();
31796        __struct.stream_id = buf.get_u8();
31797        __struct.camera_device_id = buf.get_u8();
31798        Ok(__struct)
31799    }
31800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31801        let mut __tmp = BytesMut::new(bytes);
31802        #[allow(clippy::absurd_extreme_comparisons)]
31803        #[allow(unused_comparisons)]
31804        if __tmp.remaining() < Self::ENCODED_LEN {
31805            panic!(
31806                "buffer is too small (need {} bytes, but got {})",
31807                Self::ENCODED_LEN,
31808                __tmp.remaining(),
31809            )
31810        }
31811        __tmp.put_f32_le(self.framerate);
31812        __tmp.put_u32_le(self.bitrate);
31813        __tmp.put_u16_le(self.flags.bits());
31814        __tmp.put_u16_le(self.resolution_h);
31815        __tmp.put_u16_le(self.resolution_v);
31816        __tmp.put_u16_le(self.rotation);
31817        __tmp.put_u16_le(self.hfov);
31818        __tmp.put_u8(self.stream_id);
31819        if matches!(version, MavlinkVersion::V2) {
31820            __tmp.put_u8(self.camera_device_id);
31821            let len = __tmp.len();
31822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31823        } else {
31824            __tmp.len()
31825        }
31826    }
31827}
31828#[doc = "Local position/attitude estimate from a vision source."]
31829#[doc = ""]
31830#[doc = "ID: 102"]
31831#[derive(Debug, Clone, PartialEq)]
31832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31834#[cfg_attr(feature = "ts", derive(TS))]
31835#[cfg_attr(feature = "ts", ts(export))]
31836pub struct VISION_POSITION_ESTIMATE_DATA {
31837    #[doc = "Timestamp (UNIX time or time since system boot)"]
31838    pub usec: u64,
31839    #[doc = "Local X position"]
31840    pub x: f32,
31841    #[doc = "Local Y position"]
31842    pub y: f32,
31843    #[doc = "Local Z position"]
31844    pub z: f32,
31845    #[doc = "Roll angle"]
31846    pub roll: f32,
31847    #[doc = "Pitch angle"]
31848    pub pitch: f32,
31849    #[doc = "Yaw angle"]
31850    pub yaw: f32,
31851    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31852    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31854    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31855    pub covariance: [f32; 21],
31856    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31857    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31858    pub reset_counter: u8,
31859}
31860impl VISION_POSITION_ESTIMATE_DATA {
31861    pub const ENCODED_LEN: usize = 117usize;
31862    pub const DEFAULT: Self = Self {
31863        usec: 0_u64,
31864        x: 0.0_f32,
31865        y: 0.0_f32,
31866        z: 0.0_f32,
31867        roll: 0.0_f32,
31868        pitch: 0.0_f32,
31869        yaw: 0.0_f32,
31870        covariance: [0.0_f32; 21usize],
31871        reset_counter: 0_u8,
31872    };
31873    #[cfg(feature = "arbitrary")]
31874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31875        use arbitrary::{Arbitrary, Unstructured};
31876        let mut buf = [0u8; 1024];
31877        rng.fill_bytes(&mut buf);
31878        let mut unstructured = Unstructured::new(&buf);
31879        Self::arbitrary(&mut unstructured).unwrap_or_default()
31880    }
31881}
31882impl Default for VISION_POSITION_ESTIMATE_DATA {
31883    fn default() -> Self {
31884        Self::DEFAULT.clone()
31885    }
31886}
31887impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31888    type Message = MavMessage;
31889    const ID: u32 = 102u32;
31890    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31891    const EXTRA_CRC: u8 = 158u8;
31892    const ENCODED_LEN: usize = 117usize;
31893    fn deser(
31894        _version: MavlinkVersion,
31895        __input: &[u8],
31896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31897        let avail_len = __input.len();
31898        let mut payload_buf = [0; Self::ENCODED_LEN];
31899        let mut buf = if avail_len < Self::ENCODED_LEN {
31900            payload_buf[0..avail_len].copy_from_slice(__input);
31901            Bytes::new(&payload_buf)
31902        } else {
31903            Bytes::new(__input)
31904        };
31905        let mut __struct = Self::default();
31906        __struct.usec = buf.get_u64_le();
31907        __struct.x = buf.get_f32_le();
31908        __struct.y = buf.get_f32_le();
31909        __struct.z = buf.get_f32_le();
31910        __struct.roll = buf.get_f32_le();
31911        __struct.pitch = buf.get_f32_le();
31912        __struct.yaw = buf.get_f32_le();
31913        for v in &mut __struct.covariance {
31914            let val = buf.get_f32_le();
31915            *v = val;
31916        }
31917        __struct.reset_counter = buf.get_u8();
31918        Ok(__struct)
31919    }
31920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31921        let mut __tmp = BytesMut::new(bytes);
31922        #[allow(clippy::absurd_extreme_comparisons)]
31923        #[allow(unused_comparisons)]
31924        if __tmp.remaining() < Self::ENCODED_LEN {
31925            panic!(
31926                "buffer is too small (need {} bytes, but got {})",
31927                Self::ENCODED_LEN,
31928                __tmp.remaining(),
31929            )
31930        }
31931        __tmp.put_u64_le(self.usec);
31932        __tmp.put_f32_le(self.x);
31933        __tmp.put_f32_le(self.y);
31934        __tmp.put_f32_le(self.z);
31935        __tmp.put_f32_le(self.roll);
31936        __tmp.put_f32_le(self.pitch);
31937        __tmp.put_f32_le(self.yaw);
31938        if matches!(version, MavlinkVersion::V2) {
31939            for val in &self.covariance {
31940                __tmp.put_f32_le(*val);
31941            }
31942            __tmp.put_u8(self.reset_counter);
31943            let len = __tmp.len();
31944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31945        } else {
31946            __tmp.len()
31947        }
31948    }
31949}
31950#[doc = "Speed estimate from a vision source."]
31951#[doc = ""]
31952#[doc = "ID: 103"]
31953#[derive(Debug, Clone, PartialEq)]
31954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31956#[cfg_attr(feature = "ts", derive(TS))]
31957#[cfg_attr(feature = "ts", ts(export))]
31958pub struct VISION_SPEED_ESTIMATE_DATA {
31959    #[doc = "Timestamp (UNIX time or time since system boot)"]
31960    pub usec: u64,
31961    #[doc = "Global X speed"]
31962    pub x: f32,
31963    #[doc = "Global Y speed"]
31964    pub y: f32,
31965    #[doc = "Global Z speed"]
31966    pub z: f32,
31967    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31968    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31970    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31971    pub covariance: [f32; 9],
31972    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31973    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31974    pub reset_counter: u8,
31975}
31976impl VISION_SPEED_ESTIMATE_DATA {
31977    pub const ENCODED_LEN: usize = 57usize;
31978    pub const DEFAULT: Self = Self {
31979        usec: 0_u64,
31980        x: 0.0_f32,
31981        y: 0.0_f32,
31982        z: 0.0_f32,
31983        covariance: [0.0_f32; 9usize],
31984        reset_counter: 0_u8,
31985    };
31986    #[cfg(feature = "arbitrary")]
31987    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31988        use arbitrary::{Arbitrary, Unstructured};
31989        let mut buf = [0u8; 1024];
31990        rng.fill_bytes(&mut buf);
31991        let mut unstructured = Unstructured::new(&buf);
31992        Self::arbitrary(&mut unstructured).unwrap_or_default()
31993    }
31994}
31995impl Default for VISION_SPEED_ESTIMATE_DATA {
31996    fn default() -> Self {
31997        Self::DEFAULT.clone()
31998    }
31999}
32000impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32001    type Message = MavMessage;
32002    const ID: u32 = 103u32;
32003    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32004    const EXTRA_CRC: u8 = 208u8;
32005    const ENCODED_LEN: usize = 57usize;
32006    fn deser(
32007        _version: MavlinkVersion,
32008        __input: &[u8],
32009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32010        let avail_len = __input.len();
32011        let mut payload_buf = [0; Self::ENCODED_LEN];
32012        let mut buf = if avail_len < Self::ENCODED_LEN {
32013            payload_buf[0..avail_len].copy_from_slice(__input);
32014            Bytes::new(&payload_buf)
32015        } else {
32016            Bytes::new(__input)
32017        };
32018        let mut __struct = Self::default();
32019        __struct.usec = buf.get_u64_le();
32020        __struct.x = buf.get_f32_le();
32021        __struct.y = buf.get_f32_le();
32022        __struct.z = buf.get_f32_le();
32023        for v in &mut __struct.covariance {
32024            let val = buf.get_f32_le();
32025            *v = val;
32026        }
32027        __struct.reset_counter = buf.get_u8();
32028        Ok(__struct)
32029    }
32030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32031        let mut __tmp = BytesMut::new(bytes);
32032        #[allow(clippy::absurd_extreme_comparisons)]
32033        #[allow(unused_comparisons)]
32034        if __tmp.remaining() < Self::ENCODED_LEN {
32035            panic!(
32036                "buffer is too small (need {} bytes, but got {})",
32037                Self::ENCODED_LEN,
32038                __tmp.remaining(),
32039            )
32040        }
32041        __tmp.put_u64_le(self.usec);
32042        __tmp.put_f32_le(self.x);
32043        __tmp.put_f32_le(self.y);
32044        __tmp.put_f32_le(self.z);
32045        if matches!(version, MavlinkVersion::V2) {
32046            for val in &self.covariance {
32047                __tmp.put_f32_le(*val);
32048            }
32049            __tmp.put_u8(self.reset_counter);
32050            let len = __tmp.len();
32051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32052        } else {
32053            __tmp.len()
32054        }
32055    }
32056}
32057#[doc = "Cumulative distance traveled for each reported wheel."]
32058#[doc = ""]
32059#[doc = "ID: 9000"]
32060#[derive(Debug, Clone, PartialEq)]
32061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32063#[cfg_attr(feature = "ts", derive(TS))]
32064#[cfg_attr(feature = "ts", ts(export))]
32065pub struct WHEEL_DISTANCE_DATA {
32066    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32067    pub time_usec: u64,
32068    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32069    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32070    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32071    pub distance: [f64; 16],
32072    #[doc = "Number of wheels reported."]
32073    pub count: u8,
32074}
32075impl WHEEL_DISTANCE_DATA {
32076    pub const ENCODED_LEN: usize = 137usize;
32077    pub const DEFAULT: Self = Self {
32078        time_usec: 0_u64,
32079        distance: [0.0_f64; 16usize],
32080        count: 0_u8,
32081    };
32082    #[cfg(feature = "arbitrary")]
32083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32084        use arbitrary::{Arbitrary, Unstructured};
32085        let mut buf = [0u8; 1024];
32086        rng.fill_bytes(&mut buf);
32087        let mut unstructured = Unstructured::new(&buf);
32088        Self::arbitrary(&mut unstructured).unwrap_or_default()
32089    }
32090}
32091impl Default for WHEEL_DISTANCE_DATA {
32092    fn default() -> Self {
32093        Self::DEFAULT.clone()
32094    }
32095}
32096impl MessageData for WHEEL_DISTANCE_DATA {
32097    type Message = MavMessage;
32098    const ID: u32 = 9000u32;
32099    const NAME: &'static str = "WHEEL_DISTANCE";
32100    const EXTRA_CRC: u8 = 113u8;
32101    const ENCODED_LEN: usize = 137usize;
32102    fn deser(
32103        _version: MavlinkVersion,
32104        __input: &[u8],
32105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32106        let avail_len = __input.len();
32107        let mut payload_buf = [0; Self::ENCODED_LEN];
32108        let mut buf = if avail_len < Self::ENCODED_LEN {
32109            payload_buf[0..avail_len].copy_from_slice(__input);
32110            Bytes::new(&payload_buf)
32111        } else {
32112            Bytes::new(__input)
32113        };
32114        let mut __struct = Self::default();
32115        __struct.time_usec = buf.get_u64_le();
32116        for v in &mut __struct.distance {
32117            let val = buf.get_f64_le();
32118            *v = val;
32119        }
32120        __struct.count = buf.get_u8();
32121        Ok(__struct)
32122    }
32123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32124        let mut __tmp = BytesMut::new(bytes);
32125        #[allow(clippy::absurd_extreme_comparisons)]
32126        #[allow(unused_comparisons)]
32127        if __tmp.remaining() < Self::ENCODED_LEN {
32128            panic!(
32129                "buffer is too small (need {} bytes, but got {})",
32130                Self::ENCODED_LEN,
32131                __tmp.remaining(),
32132            )
32133        }
32134        __tmp.put_u64_le(self.time_usec);
32135        for val in &self.distance {
32136            __tmp.put_f64_le(*val);
32137        }
32138        __tmp.put_u8(self.count);
32139        if matches!(version, MavlinkVersion::V2) {
32140            let len = __tmp.len();
32141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32142        } else {
32143            __tmp.len()
32144        }
32145    }
32146}
32147#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32148#[doc = ""]
32149#[doc = "ID: 299"]
32150#[derive(Debug, Clone, PartialEq)]
32151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32153#[cfg_attr(feature = "ts", derive(TS))]
32154#[cfg_attr(feature = "ts", ts(export))]
32155pub struct WIFI_CONFIG_AP_DATA {
32156    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32158    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32159    pub ssid: [u8; 32],
32160    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32163    pub password: [u8; 64],
32164    #[doc = "WiFi Mode."]
32165    #[cfg_attr(feature = "serde", serde(default))]
32166    pub mode: WifiConfigApMode,
32167    #[doc = "Message acceptance response (sent back to GS)."]
32168    #[cfg_attr(feature = "serde", serde(default))]
32169    pub response: WifiConfigApResponse,
32170}
32171impl WIFI_CONFIG_AP_DATA {
32172    pub const ENCODED_LEN: usize = 98usize;
32173    pub const DEFAULT: Self = Self {
32174        ssid: [0_u8; 32usize],
32175        password: [0_u8; 64usize],
32176        mode: WifiConfigApMode::DEFAULT,
32177        response: WifiConfigApResponse::DEFAULT,
32178    };
32179    #[cfg(feature = "arbitrary")]
32180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32181        use arbitrary::{Arbitrary, Unstructured};
32182        let mut buf = [0u8; 1024];
32183        rng.fill_bytes(&mut buf);
32184        let mut unstructured = Unstructured::new(&buf);
32185        Self::arbitrary(&mut unstructured).unwrap_or_default()
32186    }
32187}
32188impl Default for WIFI_CONFIG_AP_DATA {
32189    fn default() -> Self {
32190        Self::DEFAULT.clone()
32191    }
32192}
32193impl MessageData for WIFI_CONFIG_AP_DATA {
32194    type Message = MavMessage;
32195    const ID: u32 = 299u32;
32196    const NAME: &'static str = "WIFI_CONFIG_AP";
32197    const EXTRA_CRC: u8 = 19u8;
32198    const ENCODED_LEN: usize = 98usize;
32199    fn deser(
32200        _version: MavlinkVersion,
32201        __input: &[u8],
32202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32203        let avail_len = __input.len();
32204        let mut payload_buf = [0; Self::ENCODED_LEN];
32205        let mut buf = if avail_len < Self::ENCODED_LEN {
32206            payload_buf[0..avail_len].copy_from_slice(__input);
32207            Bytes::new(&payload_buf)
32208        } else {
32209            Bytes::new(__input)
32210        };
32211        let mut __struct = Self::default();
32212        for v in &mut __struct.ssid {
32213            let val = buf.get_u8();
32214            *v = val;
32215        }
32216        for v in &mut __struct.password {
32217            let val = buf.get_u8();
32218            *v = val;
32219        }
32220        let tmp = buf.get_i8();
32221        __struct.mode =
32222            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32223                enum_type: "WifiConfigApMode",
32224                value: tmp as u32,
32225            })?;
32226        let tmp = buf.get_i8();
32227        __struct.response =
32228            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32229                enum_type: "WifiConfigApResponse",
32230                value: tmp as u32,
32231            })?;
32232        Ok(__struct)
32233    }
32234    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32235        let mut __tmp = BytesMut::new(bytes);
32236        #[allow(clippy::absurd_extreme_comparisons)]
32237        #[allow(unused_comparisons)]
32238        if __tmp.remaining() < Self::ENCODED_LEN {
32239            panic!(
32240                "buffer is too small (need {} bytes, but got {})",
32241                Self::ENCODED_LEN,
32242                __tmp.remaining(),
32243            )
32244        }
32245        for val in &self.ssid {
32246            __tmp.put_u8(*val);
32247        }
32248        for val in &self.password {
32249            __tmp.put_u8(*val);
32250        }
32251        if matches!(version, MavlinkVersion::V2) {
32252            __tmp.put_i8(self.mode as i8);
32253            __tmp.put_i8(self.response as i8);
32254            let len = __tmp.len();
32255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32256        } else {
32257            __tmp.len()
32258        }
32259    }
32260}
32261#[doc = "Winch status."]
32262#[doc = ""]
32263#[doc = "ID: 9005"]
32264#[derive(Debug, Clone, PartialEq)]
32265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32267#[cfg_attr(feature = "ts", derive(TS))]
32268#[cfg_attr(feature = "ts", ts(export))]
32269pub struct WINCH_STATUS_DATA {
32270    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32271    pub time_usec: u64,
32272    #[doc = "Length of line released. NaN if unknown"]
32273    pub line_length: f32,
32274    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32275    pub speed: f32,
32276    #[doc = "Tension on the line. NaN if unknown"]
32277    pub tension: f32,
32278    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32279    pub voltage: f32,
32280    #[doc = "Current draw from the winch. NaN if unknown"]
32281    pub current: f32,
32282    #[doc = "Status flags"]
32283    pub status: MavWinchStatusFlag,
32284    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32285    pub temperature: i16,
32286}
32287impl WINCH_STATUS_DATA {
32288    pub const ENCODED_LEN: usize = 34usize;
32289    pub const DEFAULT: Self = Self {
32290        time_usec: 0_u64,
32291        line_length: 0.0_f32,
32292        speed: 0.0_f32,
32293        tension: 0.0_f32,
32294        voltage: 0.0_f32,
32295        current: 0.0_f32,
32296        status: MavWinchStatusFlag::DEFAULT,
32297        temperature: 0_i16,
32298    };
32299    #[cfg(feature = "arbitrary")]
32300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32301        use arbitrary::{Arbitrary, Unstructured};
32302        let mut buf = [0u8; 1024];
32303        rng.fill_bytes(&mut buf);
32304        let mut unstructured = Unstructured::new(&buf);
32305        Self::arbitrary(&mut unstructured).unwrap_or_default()
32306    }
32307}
32308impl Default for WINCH_STATUS_DATA {
32309    fn default() -> Self {
32310        Self::DEFAULT.clone()
32311    }
32312}
32313impl MessageData for WINCH_STATUS_DATA {
32314    type Message = MavMessage;
32315    const ID: u32 = 9005u32;
32316    const NAME: &'static str = "WINCH_STATUS";
32317    const EXTRA_CRC: u8 = 117u8;
32318    const ENCODED_LEN: usize = 34usize;
32319    fn deser(
32320        _version: MavlinkVersion,
32321        __input: &[u8],
32322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32323        let avail_len = __input.len();
32324        let mut payload_buf = [0; Self::ENCODED_LEN];
32325        let mut buf = if avail_len < Self::ENCODED_LEN {
32326            payload_buf[0..avail_len].copy_from_slice(__input);
32327            Bytes::new(&payload_buf)
32328        } else {
32329            Bytes::new(__input)
32330        };
32331        let mut __struct = Self::default();
32332        __struct.time_usec = buf.get_u64_le();
32333        __struct.line_length = buf.get_f32_le();
32334        __struct.speed = buf.get_f32_le();
32335        __struct.tension = buf.get_f32_le();
32336        __struct.voltage = buf.get_f32_le();
32337        __struct.current = buf.get_f32_le();
32338        let tmp = buf.get_u32_le();
32339        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
32340            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32341                flag_type: "MavWinchStatusFlag",
32342                value: tmp as u32,
32343            })?;
32344        __struct.temperature = buf.get_i16_le();
32345        Ok(__struct)
32346    }
32347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32348        let mut __tmp = BytesMut::new(bytes);
32349        #[allow(clippy::absurd_extreme_comparisons)]
32350        #[allow(unused_comparisons)]
32351        if __tmp.remaining() < Self::ENCODED_LEN {
32352            panic!(
32353                "buffer is too small (need {} bytes, but got {})",
32354                Self::ENCODED_LEN,
32355                __tmp.remaining(),
32356            )
32357        }
32358        __tmp.put_u64_le(self.time_usec);
32359        __tmp.put_f32_le(self.line_length);
32360        __tmp.put_f32_le(self.speed);
32361        __tmp.put_f32_le(self.tension);
32362        __tmp.put_f32_le(self.voltage);
32363        __tmp.put_f32_le(self.current);
32364        __tmp.put_u32_le(self.status.bits());
32365        __tmp.put_i16_le(self.temperature);
32366        if matches!(version, MavlinkVersion::V2) {
32367            let len = __tmp.len();
32368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32369        } else {
32370            __tmp.len()
32371        }
32372    }
32373}
32374#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32375#[doc = ""]
32376#[doc = "ID: 231"]
32377#[derive(Debug, Clone, PartialEq)]
32378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32380#[cfg_attr(feature = "ts", derive(TS))]
32381#[cfg_attr(feature = "ts", ts(export))]
32382pub struct WIND_COV_DATA {
32383    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32384    pub time_usec: u64,
32385    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32386    pub wind_x: f32,
32387    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32388    pub wind_y: f32,
32389    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32390    pub wind_z: f32,
32391    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32392    pub var_horiz: f32,
32393    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32394    pub var_vert: f32,
32395    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32396    pub wind_alt: f32,
32397    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32398    pub horiz_accuracy: f32,
32399    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32400    pub vert_accuracy: f32,
32401}
32402impl WIND_COV_DATA {
32403    pub const ENCODED_LEN: usize = 40usize;
32404    pub const DEFAULT: Self = Self {
32405        time_usec: 0_u64,
32406        wind_x: 0.0_f32,
32407        wind_y: 0.0_f32,
32408        wind_z: 0.0_f32,
32409        var_horiz: 0.0_f32,
32410        var_vert: 0.0_f32,
32411        wind_alt: 0.0_f32,
32412        horiz_accuracy: 0.0_f32,
32413        vert_accuracy: 0.0_f32,
32414    };
32415    #[cfg(feature = "arbitrary")]
32416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32417        use arbitrary::{Arbitrary, Unstructured};
32418        let mut buf = [0u8; 1024];
32419        rng.fill_bytes(&mut buf);
32420        let mut unstructured = Unstructured::new(&buf);
32421        Self::arbitrary(&mut unstructured).unwrap_or_default()
32422    }
32423}
32424impl Default for WIND_COV_DATA {
32425    fn default() -> Self {
32426        Self::DEFAULT.clone()
32427    }
32428}
32429impl MessageData for WIND_COV_DATA {
32430    type Message = MavMessage;
32431    const ID: u32 = 231u32;
32432    const NAME: &'static str = "WIND_COV";
32433    const EXTRA_CRC: u8 = 105u8;
32434    const ENCODED_LEN: usize = 40usize;
32435    fn deser(
32436        _version: MavlinkVersion,
32437        __input: &[u8],
32438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32439        let avail_len = __input.len();
32440        let mut payload_buf = [0; Self::ENCODED_LEN];
32441        let mut buf = if avail_len < Self::ENCODED_LEN {
32442            payload_buf[0..avail_len].copy_from_slice(__input);
32443            Bytes::new(&payload_buf)
32444        } else {
32445            Bytes::new(__input)
32446        };
32447        let mut __struct = Self::default();
32448        __struct.time_usec = buf.get_u64_le();
32449        __struct.wind_x = buf.get_f32_le();
32450        __struct.wind_y = buf.get_f32_le();
32451        __struct.wind_z = buf.get_f32_le();
32452        __struct.var_horiz = buf.get_f32_le();
32453        __struct.var_vert = buf.get_f32_le();
32454        __struct.wind_alt = buf.get_f32_le();
32455        __struct.horiz_accuracy = buf.get_f32_le();
32456        __struct.vert_accuracy = buf.get_f32_le();
32457        Ok(__struct)
32458    }
32459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32460        let mut __tmp = BytesMut::new(bytes);
32461        #[allow(clippy::absurd_extreme_comparisons)]
32462        #[allow(unused_comparisons)]
32463        if __tmp.remaining() < Self::ENCODED_LEN {
32464            panic!(
32465                "buffer is too small (need {} bytes, but got {})",
32466                Self::ENCODED_LEN,
32467                __tmp.remaining(),
32468            )
32469        }
32470        __tmp.put_u64_le(self.time_usec);
32471        __tmp.put_f32_le(self.wind_x);
32472        __tmp.put_f32_le(self.wind_y);
32473        __tmp.put_f32_le(self.wind_z);
32474        __tmp.put_f32_le(self.var_horiz);
32475        __tmp.put_f32_le(self.var_vert);
32476        __tmp.put_f32_le(self.wind_alt);
32477        __tmp.put_f32_le(self.horiz_accuracy);
32478        __tmp.put_f32_le(self.vert_accuracy);
32479        if matches!(version, MavlinkVersion::V2) {
32480            let len = __tmp.len();
32481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32482        } else {
32483            __tmp.len()
32484        }
32485    }
32486}
32487#[derive(Clone, PartialEq, Debug)]
32488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32489#[cfg_attr(feature = "serde", serde(tag = "type"))]
32490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32491#[cfg_attr(feature = "ts", derive(TS))]
32492#[cfg_attr(feature = "ts", ts(export))]
32493#[repr(u32)]
32494pub enum MavMessage {
32495    #[doc = "Set the vehicle attitude and body angular rates."]
32496    #[doc = ""]
32497    #[doc = "ID: 140"]
32498    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32499    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32500    #[doc = ""]
32501    #[doc = "ID: 375"]
32502    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32503    #[doc = "The location and information of an ADSB vehicle."]
32504    #[doc = ""]
32505    #[doc = "ID: 246"]
32506    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32507    #[doc = "The location and information of an AIS vessel."]
32508    #[doc = ""]
32509    #[doc = "ID: 301"]
32510    AIS_VESSEL(AIS_VESSEL_DATA),
32511    #[doc = "The current system altitude."]
32512    #[doc = ""]
32513    #[doc = "ID: 141"]
32514    ALTITUDE(ALTITUDE_DATA),
32515    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32516    #[doc = ""]
32517    #[doc = "ID: 30"]
32518    ATTITUDE(ATTITUDE_DATA),
32519    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32520    #[doc = ""]
32521    #[doc = "ID: 31"]
32522    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32523    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32524    #[doc = ""]
32525    #[doc = "ID: 61"]
32526    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32527    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32528    #[doc = ""]
32529    #[doc = "ID: 83"]
32530    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32531    #[doc = "Motion capture attitude and position."]
32532    #[doc = ""]
32533    #[doc = "ID: 138"]
32534    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32535    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32536    #[doc = ""]
32537    #[doc = "ID: 7"]
32538    AUTH_KEY(AUTH_KEY_DATA),
32539    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32540    #[doc = ""]
32541    #[doc = "ID: 286"]
32542    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32543    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32544    #[doc = ""]
32545    #[doc = "ID: 148"]
32546    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32547    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32548    #[doc = ""]
32549    #[doc = "ID: 435"]
32550    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32551    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32552    #[doc = ""]
32553    #[doc = "ID: 437"]
32554    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32555    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32556    #[doc = ""]
32557    #[doc = "ID: 372"]
32558    BATTERY_INFO(BATTERY_INFO_DATA),
32559    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32560    #[doc = ""]
32561    #[doc = "ID: 147"]
32562    BATTERY_STATUS(BATTERY_STATUS_DATA),
32563    #[doc = "Report button state change."]
32564    #[doc = ""]
32565    #[doc = "ID: 257"]
32566    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32567    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32568    #[doc = ""]
32569    #[doc = "ID: 262"]
32570    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32571    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32572    #[doc = ""]
32573    #[doc = "ID: 271"]
32574    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32575    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32576    #[doc = ""]
32577    #[doc = "ID: 263"]
32578    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32579    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32580    #[doc = ""]
32581    #[doc = "ID: 259"]
32582    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32583    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32584    #[doc = ""]
32585    #[doc = "ID: 260"]
32586    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32587    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32588    #[doc = ""]
32589    #[doc = "ID: 277"]
32590    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32591    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32592    #[doc = ""]
32593    #[doc = "ID: 276"]
32594    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32595    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32596    #[doc = ""]
32597    #[doc = "ID: 275"]
32598    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32599    #[doc = "Camera-IMU triggering and synchronisation message."]
32600    #[doc = ""]
32601    #[doc = "ID: 112"]
32602    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32603    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32604    #[doc = ""]
32605    #[doc = "ID: 387"]
32606    CANFD_FRAME(CANFD_FRAME_DATA),
32607    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32608    #[doc = ""]
32609    #[doc = "ID: 388"]
32610    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32611    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32612    #[doc = ""]
32613    #[doc = "ID: 386"]
32614    CAN_FRAME(CAN_FRAME_DATA),
32615    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32616    #[doc = ""]
32617    #[doc = "ID: 336"]
32618    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32619    #[doc = "Report current used cellular network status."]
32620    #[doc = ""]
32621    #[doc = "ID: 334"]
32622    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32623    #[doc = "Request to control this MAV."]
32624    #[doc = ""]
32625    #[doc = "ID: 5"]
32626    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32627    #[doc = "Accept / deny control of this MAV."]
32628    #[doc = ""]
32629    #[doc = "ID: 6"]
32630    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32631    #[doc = "Information about a potential collision."]
32632    #[doc = ""]
32633    #[doc = "ID: 247"]
32634    COLLISION(COLLISION_DATA),
32635    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32636    #[doc = ""]
32637    #[doc = "ID: 77"]
32638    COMMAND_ACK(COMMAND_ACK_DATA),
32639    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32640    #[doc = ""]
32641    #[doc = "ID: 80"]
32642    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32643    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32644    #[doc = ""]
32645    #[doc = "ID: 75"]
32646    COMMAND_INT(COMMAND_INT_DATA),
32647    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32648    #[doc = ""]
32649    #[doc = "ID: 76"]
32650    COMMAND_LONG(COMMAND_LONG_DATA),
32651    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32652    #[doc = ""]
32653    #[doc = "ID: 395"]
32654    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32655    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32656    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32657    #[doc = ""]
32658    #[doc = "ID: 396"]
32659    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32660    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32661    #[doc = ""]
32662    #[doc = "ID: 397"]
32663    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32664    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32665    #[doc = ""]
32666    #[doc = "ID: 146"]
32667    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32668    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32669    #[doc = ""]
32670    #[doc = "ID: 411"]
32671    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32672    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32673    #[doc = ""]
32674    #[doc = "ID: 436"]
32675    CURRENT_MODE(CURRENT_MODE_DATA),
32676    #[doc = "Data stream status information."]
32677    #[doc = ""]
32678    #[doc = "ID: 67"]
32679    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32680    DATA_STREAM(DATA_STREAM_DATA),
32681    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32682    #[doc = ""]
32683    #[doc = "ID: 130"]
32684    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32685    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32686    #[doc = ""]
32687    #[doc = "ID: 254"]
32688    DEBUG(DEBUG_DATA),
32689    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32690    #[doc = ""]
32691    #[doc = "ID: 350"]
32692    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32693    #[doc = "To debug something using a named 3D vector."]
32694    #[doc = ""]
32695    #[doc = "ID: 250"]
32696    DEBUG_VECT(DEBUG_VECT_DATA),
32697    #[doc = "Distance sensor information for an onboard rangefinder."]
32698    #[doc = ""]
32699    #[doc = "ID: 132"]
32700    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32701    #[doc = "EFI status output."]
32702    #[doc = ""]
32703    #[doc = "ID: 225"]
32704    EFI_STATUS(EFI_STATUS_DATA),
32705    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32706    #[doc = ""]
32707    #[doc = "ID: 131"]
32708    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32709    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32710    #[doc = ""]
32711    #[doc = "ID: 290"]
32712    ESC_INFO(ESC_INFO_DATA),
32713    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32714    #[doc = ""]
32715    #[doc = "ID: 291"]
32716    ESC_STATUS(ESC_STATUS_DATA),
32717    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32718    #[doc = ""]
32719    #[doc = "ID: 230"]
32720    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32721    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32722    #[doc = ""]
32723    #[doc = "ID: 410"]
32724    EVENT(EVENT_DATA),
32725    #[doc = "Provides state for additional features."]
32726    #[doc = ""]
32727    #[doc = "ID: 245"]
32728    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32729    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32730    #[doc = ""]
32731    #[doc = "ID: 162"]
32732    FENCE_STATUS(FENCE_STATUS_DATA),
32733    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32734    #[doc = ""]
32735    #[doc = "ID: 110"]
32736    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32737    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32738    #[doc = ""]
32739    #[doc = "ID: 264"]
32740    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32741    #[doc = "Current motion information from a designated system."]
32742    #[doc = ""]
32743    #[doc = "ID: 144"]
32744    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32745    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32746    #[doc = ""]
32747    #[doc = "ID: 371"]
32748    FUEL_STATUS(FUEL_STATUS_DATA),
32749    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32750    #[doc = ""]
32751    #[doc = "ID: 373"]
32752    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32753    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32754    #[doc = ""]
32755    #[doc = "ID: 285"]
32756    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32757    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32758    #[doc = ""]
32759    #[doc = "ID: 283"]
32760    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32761    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32762    #[doc = ""]
32763    #[doc = "ID: 284"]
32764    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32765    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32766    #[doc = ""]
32767    #[doc = "ID: 280"]
32768    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32769    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32770    #[doc = ""]
32771    #[doc = "ID: 282"]
32772    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32773    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32774    #[doc = ""]
32775    #[doc = "ID: 288"]
32776    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32777    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32778    #[doc = ""]
32779    #[doc = "ID: 287"]
32780    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32781    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32782    #[doc = ""]
32783    #[doc = "ID: 281"]
32784    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32785    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32786    #[doc = ""]
32787    #[doc = "ID: 33"]
32788    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32789    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32790    #[doc = ""]
32791    #[doc = "ID: 63"]
32792    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32793    #[doc = "Global position/attitude estimate from a vision source."]
32794    #[doc = ""]
32795    #[doc = "ID: 101"]
32796    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32797    #[doc = "Second GPS data."]
32798    #[doc = ""]
32799    #[doc = "ID: 124"]
32800    GPS2_RAW(GPS2_RAW_DATA),
32801    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32802    #[doc = ""]
32803    #[doc = "ID: 128"]
32804    GPS2_RTK(GPS2_RTK_DATA),
32805    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32806    #[doc = ""]
32807    #[doc = "ID: 49"]
32808    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32809    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32810    #[doc = ""]
32811    #[doc = "ID: 123"]
32812    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32813    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32814    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32815    #[doc = ""]
32816    #[doc = "ID: 232"]
32817    GPS_INPUT(GPS_INPUT_DATA),
32818    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32819    #[doc = ""]
32820    #[doc = "ID: 24"]
32821    GPS_RAW_INT(GPS_RAW_INT_DATA),
32822    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32823    #[doc = ""]
32824    #[doc = "ID: 233"]
32825    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32826    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32827    #[doc = ""]
32828    #[doc = "ID: 127"]
32829    GPS_RTK(GPS_RTK_DATA),
32830    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32831    #[doc = ""]
32832    #[doc = "ID: 25"]
32833    GPS_STATUS(GPS_STATUS_DATA),
32834    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32835    #[doc = ""]
32836    #[doc = "ID: 0"]
32837    HEARTBEAT(HEARTBEAT_DATA),
32838    #[doc = "The IMU readings in SI units in NED body frame."]
32839    #[doc = ""]
32840    #[doc = "ID: 105"]
32841    HIGHRES_IMU(HIGHRES_IMU_DATA),
32842    #[doc = "Message appropriate for high latency connections like Iridium."]
32843    #[doc = ""]
32844    #[doc = "ID: 234"]
32845    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32846    HIGH_LATENCY(HIGH_LATENCY_DATA),
32847    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32848    #[doc = ""]
32849    #[doc = "ID: 235"]
32850    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32851    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32852    #[doc = ""]
32853    #[doc = "ID: 93"]
32854    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32855    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32856    #[doc = ""]
32857    #[doc = "ID: 91"]
32858    HIL_CONTROLS(HIL_CONTROLS_DATA),
32859    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32860    #[doc = ""]
32861    #[doc = "ID: 113"]
32862    HIL_GPS(HIL_GPS_DATA),
32863    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32864    #[doc = ""]
32865    #[doc = "ID: 114"]
32866    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32867    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32868    #[doc = ""]
32869    #[doc = "ID: 92"]
32870    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32871    #[doc = "The IMU readings in SI units in NED body frame."]
32872    #[doc = ""]
32873    #[doc = "ID: 107"]
32874    HIL_SENSOR(HIL_SENSOR_DATA),
32875    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32876    #[doc = ""]
32877    #[doc = "ID: 90"]
32878    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32879    HIL_STATE(HIL_STATE_DATA),
32880    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32881    #[doc = ""]
32882    #[doc = "ID: 115"]
32883    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32884    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32885    #[doc = ""]
32886    #[doc = "ID: 242"]
32887    HOME_POSITION(HOME_POSITION_DATA),
32888    #[doc = "Temperature and humidity from hygrometer."]
32889    #[doc = ""]
32890    #[doc = "ID: 12920"]
32891    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32892    #[doc = "Illuminator status."]
32893    #[doc = ""]
32894    #[doc = "ID: 440"]
32895    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32896    #[doc = "Status of the Iridium SBD link."]
32897    #[doc = ""]
32898    #[doc = "ID: 335"]
32899    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32900    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32901    #[doc = ""]
32902    #[doc = "ID: 149"]
32903    LANDING_TARGET(LANDING_TARGET_DATA),
32904    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32905    #[doc = ""]
32906    #[doc = "ID: 8"]
32907    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32908    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32909    #[doc = ""]
32910    #[doc = "ID: 32"]
32911    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32912    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32913    #[doc = ""]
32914    #[doc = "ID: 64"]
32915    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32916    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32917    #[doc = ""]
32918    #[doc = "ID: 89"]
32919    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32920    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32921    #[doc = ""]
32922    #[doc = "ID: 268"]
32923    LOGGING_ACK(LOGGING_ACK_DATA),
32924    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32925    #[doc = ""]
32926    #[doc = "ID: 266"]
32927    LOGGING_DATA(LOGGING_DATA_DATA),
32928    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32929    #[doc = ""]
32930    #[doc = "ID: 267"]
32931    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32932    #[doc = "Reply to LOG_REQUEST_DATA."]
32933    #[doc = ""]
32934    #[doc = "ID: 120"]
32935    LOG_DATA(LOG_DATA_DATA),
32936    #[doc = "Reply to LOG_REQUEST_LIST."]
32937    #[doc = ""]
32938    #[doc = "ID: 118"]
32939    LOG_ENTRY(LOG_ENTRY_DATA),
32940    #[doc = "Erase all logs."]
32941    #[doc = ""]
32942    #[doc = "ID: 121"]
32943    LOG_ERASE(LOG_ERASE_DATA),
32944    #[doc = "Request a chunk of a log."]
32945    #[doc = ""]
32946    #[doc = "ID: 119"]
32947    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32948    #[doc = "Stop log transfer and resume normal logging."]
32949    #[doc = ""]
32950    #[doc = "ID: 122"]
32951    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32952    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32953    #[doc = ""]
32954    #[doc = "ID: 117"]
32955    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32956    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32957    #[doc = ""]
32958    #[doc = "ID: 192"]
32959    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32960    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32961    #[doc = ""]
32962    #[doc = "ID: 69"]
32963    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32964    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32965    #[doc = ""]
32966    #[doc = "ID: 81"]
32967    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32968    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32969    #[doc = ""]
32970    #[doc = "ID: 249"]
32971    MEMORY_VECT(MEMORY_VECT_DATA),
32972    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32973    #[doc = ""]
32974    #[doc = "ID: 244"]
32975    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32976    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32977    #[doc = ""]
32978    #[doc = "ID: 47"]
32979    MISSION_ACK(MISSION_ACK_DATA),
32980    #[doc = "Delete all mission items at once."]
32981    #[doc = ""]
32982    #[doc = "ID: 45"]
32983    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32984    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32985    #[doc = ""]
32986    #[doc = "ID: 44"]
32987    MISSION_COUNT(MISSION_COUNT_DATA),
32988    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32989    #[doc = ""]
32990    #[doc = "ID: 42"]
32991    MISSION_CURRENT(MISSION_CURRENT_DATA),
32992    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32993    #[doc = ""]
32994    #[doc = "ID: 39"]
32995    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32996    MISSION_ITEM(MISSION_ITEM_DATA),
32997    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32998    #[doc = ""]
32999    #[doc = "ID: 73"]
33000    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33001    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33002    #[doc = ""]
33003    #[doc = "ID: 46"]
33004    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33005    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33006    #[doc = ""]
33007    #[doc = "ID: 40"]
33008    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33009    MISSION_REQUEST(MISSION_REQUEST_DATA),
33010    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33011    #[doc = ""]
33012    #[doc = "ID: 51"]
33013    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33014    #[doc = "Request the overall list of mission items from the system/component."]
33015    #[doc = ""]
33016    #[doc = "ID: 43"]
33017    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33018    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33019    #[doc = ""]
33020    #[doc = "ID: 37"]
33021    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33022    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33023    #[doc = ""]
33024    #[doc = "ID: 41"]
33025    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33026    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33027    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33028    #[doc = ""]
33029    #[doc = "ID: 38"]
33030    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33031    #[doc = "Orientation of a mount."]
33032    #[doc = ""]
33033    #[doc = "ID: 265"]
33034    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33035    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33036    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33037    #[doc = ""]
33038    #[doc = "ID: 251"]
33039    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33040    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33041    #[doc = ""]
33042    #[doc = "ID: 252"]
33043    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33044    #[doc = "The state of the navigation and position controller."]
33045    #[doc = ""]
33046    #[doc = "ID: 62"]
33047    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33048    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33049    #[doc = ""]
33050    #[doc = "ID: 330"]
33051    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33052    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33053    #[doc = ""]
33054    #[doc = "ID: 331"]
33055    ODOMETRY(ODOMETRY_DATA),
33056    #[doc = "Hardware status sent by an onboard computer."]
33057    #[doc = ""]
33058    #[doc = "ID: 390"]
33059    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33060    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33061    #[doc = ""]
33062    #[doc = "ID: 12918"]
33063    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33064    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33065    #[doc = ""]
33066    #[doc = "ID: 12902"]
33067    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33068    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33069    #[doc = ""]
33070    #[doc = "ID: 12900"]
33071    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33072    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33073    #[doc = ""]
33074    #[doc = "ID: 12901"]
33075    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33076    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33077    #[doc = ""]
33078    #[doc = "ID: 12915"]
33079    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33080    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33081    #[doc = ""]
33082    #[doc = "ID: 12905"]
33083    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33084    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33085    #[doc = ""]
33086    #[doc = "ID: 12903"]
33087    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33088    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33089    #[doc = ""]
33090    #[doc = "ID: 12904"]
33091    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33092    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33093    #[doc = ""]
33094    #[doc = "ID: 12919"]
33095    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33096    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33097    #[doc = ""]
33098    #[doc = "ID: 100"]
33099    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33100    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33101    #[doc = ""]
33102    #[doc = "ID: 106"]
33103    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33104    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33105    #[doc = ""]
33106    #[doc = "ID: 360"]
33107    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33108    #[doc = "Response from a PARAM_EXT_SET message."]
33109    #[doc = ""]
33110    #[doc = "ID: 324"]
33111    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33112    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33113    #[doc = ""]
33114    #[doc = "ID: 321"]
33115    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33116    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33117    #[doc = ""]
33118    #[doc = "ID: 320"]
33119    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33120    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33121    #[doc = ""]
33122    #[doc = "ID: 323"]
33123    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33124    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33125    #[doc = ""]
33126    #[doc = "ID: 322"]
33127    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33128    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33129    #[doc = ""]
33130    #[doc = "ID: 50"]
33131    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33132    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33133    #[doc = ""]
33134    #[doc = "ID: 21"]
33135    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33136    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33137    #[doc = ""]
33138    #[doc = "ID: 20"]
33139    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33140    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33141    #[doc = ""]
33142    #[doc = "ID: 23"]
33143    PARAM_SET(PARAM_SET_DATA),
33144    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33145    #[doc = ""]
33146    #[doc = "ID: 22"]
33147    PARAM_VALUE(PARAM_VALUE_DATA),
33148    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33149    #[doc = ""]
33150    #[doc = "ID: 4"]
33151    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33152    PING(PING_DATA),
33153    #[doc = "Control vehicle tone generation (buzzer)."]
33154    #[doc = ""]
33155    #[doc = "ID: 258"]
33156    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33157    PLAY_TUNE(PLAY_TUNE_DATA),
33158    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33159    #[doc = ""]
33160    #[doc = "ID: 400"]
33161    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33162    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33163    #[doc = ""]
33164    #[doc = "ID: 87"]
33165    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33166    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33167    #[doc = ""]
33168    #[doc = "ID: 85"]
33169    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33170    #[doc = "Power supply status."]
33171    #[doc = ""]
33172    #[doc = "ID: 125"]
33173    POWER_STATUS(POWER_STATUS_DATA),
33174    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33175    #[doc = ""]
33176    #[doc = "ID: 300"]
33177    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33178    #[doc = "Status generated by radio and injected into MAVLink stream."]
33179    #[doc = ""]
33180    #[doc = "ID: 109"]
33181    RADIO_STATUS(RADIO_STATUS_DATA),
33182    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33183    #[doc = ""]
33184    #[doc = "ID: 27"]
33185    RAW_IMU(RAW_IMU_DATA),
33186    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33187    #[doc = ""]
33188    #[doc = "ID: 28"]
33189    RAW_PRESSURE(RAW_PRESSURE_DATA),
33190    #[doc = "RPM sensor data message."]
33191    #[doc = ""]
33192    #[doc = "ID: 339"]
33193    RAW_RPM(RAW_RPM_DATA),
33194    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33195    #[doc = ""]
33196    #[doc = "ID: 65"]
33197    RC_CHANNELS(RC_CHANNELS_DATA),
33198    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33199    #[doc = ""]
33200    #[doc = "ID: 70"]
33201    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33202    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33203    #[doc = ""]
33204    #[doc = "ID: 35"]
33205    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33206    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33207    #[doc = ""]
33208    #[doc = "ID: 34"]
33209    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33210    #[doc = "Request a data stream."]
33211    #[doc = ""]
33212    #[doc = "ID: 66"]
33213    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33214    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33215    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33216    #[doc = ""]
33217    #[doc = "ID: 412"]
33218    REQUEST_EVENT(REQUEST_EVENT_DATA),
33219    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33220    #[doc = ""]
33221    #[doc = "ID: 142"]
33222    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33223    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33224    #[doc = ""]
33225    #[doc = "ID: 413"]
33226    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33227    #[doc = "Read out the safety zone the MAV currently assumes."]
33228    #[doc = ""]
33229    #[doc = "ID: 55"]
33230    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33231    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33232    #[doc = ""]
33233    #[doc = "ID: 54"]
33234    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33235    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33236    #[doc = ""]
33237    #[doc = "ID: 26"]
33238    SCALED_IMU(SCALED_IMU_DATA),
33239    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33240    #[doc = ""]
33241    #[doc = "ID: 116"]
33242    SCALED_IMU2(SCALED_IMU2_DATA),
33243    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33244    #[doc = ""]
33245    #[doc = "ID: 129"]
33246    SCALED_IMU3(SCALED_IMU3_DATA),
33247    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33248    #[doc = ""]
33249    #[doc = "ID: 29"]
33250    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33251    #[doc = "Barometer readings for 2nd barometer."]
33252    #[doc = ""]
33253    #[doc = "ID: 137"]
33254    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33255    #[doc = "Barometer readings for 3rd barometer."]
33256    #[doc = ""]
33257    #[doc = "ID: 143"]
33258    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33259    #[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
33260    #[doc = ""]
33261    #[doc = "ID: 183"]
33262    SCRIPT_COUNT(SCRIPT_COUNT_DATA),
33263    #[doc = "This message informs about the currently active SCRIPT."]
33264    #[doc = ""]
33265    #[doc = "ID: 184"]
33266    SCRIPT_CURRENT(SCRIPT_CURRENT_DATA),
33267    #[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
33268    #[doc = ""]
33269    #[doc = "ID: 180"]
33270    SCRIPT_ITEM(SCRIPT_ITEM_DATA),
33271    #[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
33272    #[doc = ""]
33273    #[doc = "ID: 181"]
33274    SCRIPT_REQUEST(SCRIPT_REQUEST_DATA),
33275    #[doc = "Request the overall list of mission items from the system/component."]
33276    #[doc = ""]
33277    #[doc = "ID: 182"]
33278    SCRIPT_REQUEST_LIST(SCRIPT_REQUEST_LIST_DATA),
33279    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33280    #[doc = ""]
33281    #[doc = "ID: 126"]
33282    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33283    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33284    #[doc = ""]
33285    #[doc = "ID: 36"]
33286    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33287    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33288    #[doc = ""]
33289    #[doc = "ID: 256"]
33290    SETUP_SIGNING(SETUP_SIGNING_DATA),
33291    #[doc = "Set the vehicle attitude and body angular rates."]
33292    #[doc = ""]
33293    #[doc = "ID: 139"]
33294    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33295    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33296    #[doc = ""]
33297    #[doc = "ID: 82"]
33298    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33299    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33300    #[doc = ""]
33301    #[doc = "ID: 48"]
33302    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33303    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33304    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33305    #[doc = ""]
33306    #[doc = "ID: 243"]
33307    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33308    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33309    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33310    #[doc = ""]
33311    #[doc = "ID: 11"]
33312    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33313    SET_MODE(SET_MODE_DATA),
33314    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33315    #[doc = ""]
33316    #[doc = "ID: 86"]
33317    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33318    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33319    #[doc = ""]
33320    #[doc = "ID: 84"]
33321    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33322    #[doc = "Status of simulation environment, if used."]
33323    #[doc = ""]
33324    #[doc = "ID: 108"]
33325    SIM_STATE(SIM_STATE_DATA),
33326    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33327    #[doc = ""]
33328    #[doc = "ID: 370"]
33329    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33330    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33331    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33332    #[doc = ""]
33333    #[doc = "ID: 253"]
33334    STATUSTEXT(STATUSTEXT_DATA),
33335    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33336    #[doc = ""]
33337    #[doc = "ID: 261"]
33338    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33339    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33340    #[doc = ""]
33341    #[doc = "ID: 401"]
33342    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33343    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33344    #[doc = ""]
33345    #[doc = "ID: 2"]
33346    SYSTEM_TIME(SYSTEM_TIME_DATA),
33347    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33348    #[doc = ""]
33349    #[doc = "ID: 1"]
33350    SYS_STATUS(SYS_STATUS_DATA),
33351    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33352    #[doc = ""]
33353    #[doc = "ID: 135"]
33354    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33355    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33356    #[doc = ""]
33357    #[doc = "ID: 134"]
33358    TERRAIN_DATA(TERRAIN_DATA_DATA),
33359    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33360    #[doc = ""]
33361    #[doc = "ID: 136"]
33362    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33363    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33364    #[doc = ""]
33365    #[doc = "ID: 133"]
33366    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33367    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33368    #[doc = ""]
33369    #[doc = "ID: 111"]
33370    TIMESYNC(TIMESYNC_DATA),
33371    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33372    #[doc = ""]
33373    #[doc = "ID: 380"]
33374    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33375    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33376    #[doc = ""]
33377    #[doc = "ID: 333"]
33378    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33379    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33380    #[doc = ""]
33381    #[doc = "ID: 332"]
33382    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33383    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33384    #[doc = ""]
33385    #[doc = "ID: 385"]
33386    TUNNEL(TUNNEL_DATA),
33387    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33388    #[doc = ""]
33389    #[doc = "ID: 311"]
33390    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33391    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33392    #[doc = ""]
33393    #[doc = "ID: 310"]
33394    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33395    #[doc = "The global position resulting from GPS and sensor fusion."]
33396    #[doc = ""]
33397    #[doc = "ID: 340"]
33398    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33399    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33400    #[doc = ""]
33401    #[doc = "ID: 248"]
33402    V2_EXTENSION(V2_EXTENSION_DATA),
33403    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33404    #[doc = ""]
33405    #[doc = "ID: 74"]
33406    VFR_HUD(VFR_HUD_DATA),
33407    #[doc = "Vibration levels and accelerometer clipping."]
33408    #[doc = ""]
33409    #[doc = "ID: 241"]
33410    VIBRATION(VIBRATION_DATA),
33411    #[doc = "Global position estimate from a Vicon motion system source."]
33412    #[doc = ""]
33413    #[doc = "ID: 104"]
33414    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33415    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33416    #[doc = ""]
33417    #[doc = "ID: 269"]
33418    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33419    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33420    #[doc = ""]
33421    #[doc = "ID: 270"]
33422    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33423    #[doc = "Local position/attitude estimate from a vision source."]
33424    #[doc = ""]
33425    #[doc = "ID: 102"]
33426    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33427    #[doc = "Speed estimate from a vision source."]
33428    #[doc = ""]
33429    #[doc = "ID: 103"]
33430    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33431    #[doc = "Cumulative distance traveled for each reported wheel."]
33432    #[doc = ""]
33433    #[doc = "ID: 9000"]
33434    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33435    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33436    #[doc = ""]
33437    #[doc = "ID: 299"]
33438    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33439    #[doc = "Winch status."]
33440    #[doc = ""]
33441    #[doc = "ID: 9005"]
33442    WINCH_STATUS(WINCH_STATUS_DATA),
33443    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33444    #[doc = ""]
33445    #[doc = "ID: 231"]
33446    WIND_COV(WIND_COV_DATA),
33447}
33448impl MavMessage {
33449    pub const fn all_ids() -> &'static [u32] {
33450        &[
33451            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33452            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33453            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33454            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33455            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33456            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33457            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33458            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33459            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33460            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33461            148u32, 149u32, 162u32, 180u32, 181u32, 182u32, 183u32, 184u32, 192u32, 225u32, 230u32,
33462            231u32, 232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32,
33463            247u32, 248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32,
33464            259u32, 260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32,
33465            270u32, 271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32,
33466            286u32, 287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32,
33467            321u32, 322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32,
33468            339u32, 340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
33469            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
33470            412u32, 413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32,
33471            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
33472        ]
33473    }
33474}
33475impl Message for MavMessage {
33476    fn parse(
33477        version: MavlinkVersion,
33478        id: u32,
33479        payload: &[u8],
33480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33481        match id {
33482            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33483                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33484                    .map(Self::ACTUATOR_CONTROL_TARGET)
33485            }
33486            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33487                .map(Self::ACTUATOR_OUTPUT_STATUS),
33488            ADSB_VEHICLE_DATA::ID => {
33489                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33490            }
33491            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33492            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33493            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33494            ATTITUDE_QUATERNION_DATA::ID => {
33495                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33496            }
33497            ATTITUDE_QUATERNION_COV_DATA::ID => {
33498                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33499                    .map(Self::ATTITUDE_QUATERNION_COV)
33500            }
33501            ATTITUDE_TARGET_DATA::ID => {
33502                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33503            }
33504            ATT_POS_MOCAP_DATA::ID => {
33505                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33506            }
33507            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33508            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33509                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33510                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33511            }
33512            AUTOPILOT_VERSION_DATA::ID => {
33513                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33514            }
33515            AVAILABLE_MODES_DATA::ID => {
33516                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33517            }
33518            AVAILABLE_MODES_MONITOR_DATA::ID => {
33519                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33520                    .map(Self::AVAILABLE_MODES_MONITOR)
33521            }
33522            BATTERY_INFO_DATA::ID => {
33523                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33524            }
33525            BATTERY_STATUS_DATA::ID => {
33526                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33527            }
33528            BUTTON_CHANGE_DATA::ID => {
33529                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33530            }
33531            CAMERA_CAPTURE_STATUS_DATA::ID => {
33532                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33533            }
33534            CAMERA_FOV_STATUS_DATA::ID => {
33535                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33536            }
33537            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33538                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33539            }
33540            CAMERA_INFORMATION_DATA::ID => {
33541                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33542            }
33543            CAMERA_SETTINGS_DATA::ID => {
33544                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33545            }
33546            CAMERA_THERMAL_RANGE_DATA::ID => {
33547                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33548            }
33549            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33550                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33551                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33552            }
33553            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33554                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33555                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33556            }
33557            CAMERA_TRIGGER_DATA::ID => {
33558                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33559            }
33560            CANFD_FRAME_DATA::ID => {
33561                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33562            }
33563            CAN_FILTER_MODIFY_DATA::ID => {
33564                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33565            }
33566            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33567            CELLULAR_CONFIG_DATA::ID => {
33568                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33569            }
33570            CELLULAR_STATUS_DATA::ID => {
33571                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33572            }
33573            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33574                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33575                    .map(Self::CHANGE_OPERATOR_CONTROL)
33576            }
33577            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33578                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33579                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33580            }
33581            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33582            COMMAND_ACK_DATA::ID => {
33583                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33584            }
33585            COMMAND_CANCEL_DATA::ID => {
33586                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33587            }
33588            COMMAND_INT_DATA::ID => {
33589                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33590            }
33591            COMMAND_LONG_DATA::ID => {
33592                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33593            }
33594            COMPONENT_INFORMATION_DATA::ID => {
33595                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33596            }
33597            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33598                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33599                    .map(Self::COMPONENT_INFORMATION_BASIC)
33600            }
33601            COMPONENT_METADATA_DATA::ID => {
33602                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33603            }
33604            CONTROL_SYSTEM_STATE_DATA::ID => {
33605                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33606            }
33607            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33608                .map(Self::CURRENT_EVENT_SEQUENCE),
33609            CURRENT_MODE_DATA::ID => {
33610                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33611            }
33612            DATA_STREAM_DATA::ID => {
33613                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33614            }
33615            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33616                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33617                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33618            }
33619            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33620            DEBUG_FLOAT_ARRAY_DATA::ID => {
33621                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33622            }
33623            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33624            DISTANCE_SENSOR_DATA::ID => {
33625                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33626            }
33627            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33628            ENCAPSULATED_DATA_DATA::ID => {
33629                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33630            }
33631            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33632            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33633            ESTIMATOR_STATUS_DATA::ID => {
33634                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33635            }
33636            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33637            EXTENDED_SYS_STATE_DATA::ID => {
33638                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33639            }
33640            FENCE_STATUS_DATA::ID => {
33641                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33642            }
33643            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33644                .map(Self::FILE_TRANSFER_PROTOCOL),
33645            FLIGHT_INFORMATION_DATA::ID => {
33646                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33647            }
33648            FOLLOW_TARGET_DATA::ID => {
33649                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33650            }
33651            FUEL_STATUS_DATA::ID => {
33652                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33653            }
33654            GENERATOR_STATUS_DATA::ID => {
33655                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33656            }
33657            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33658                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33659                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33660            }
33661            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33662                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33663                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33664            }
33665            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33666                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33667                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33668            }
33669            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33670                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33671                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33672            }
33673            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33674                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33675                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33676            }
33677            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33678                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33679                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33680            }
33681            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33682                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33683                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33684            }
33685            GIMBAL_MANAGER_STATUS_DATA::ID => {
33686                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33687            }
33688            GLOBAL_POSITION_INT_DATA::ID => {
33689                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33690            }
33691            GLOBAL_POSITION_INT_COV_DATA::ID => {
33692                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33693                    .map(Self::GLOBAL_POSITION_INT_COV)
33694            }
33695            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33696                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33697                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33698            }
33699            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33700            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33701            GPS_GLOBAL_ORIGIN_DATA::ID => {
33702                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33703            }
33704            GPS_INJECT_DATA_DATA::ID => {
33705                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33706            }
33707            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33708            GPS_RAW_INT_DATA::ID => {
33709                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33710            }
33711            GPS_RTCM_DATA_DATA::ID => {
33712                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33713            }
33714            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33715            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33716            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33717            HIGHRES_IMU_DATA::ID => {
33718                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33719            }
33720            HIGH_LATENCY_DATA::ID => {
33721                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33722            }
33723            HIGH_LATENCY2_DATA::ID => {
33724                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33725            }
33726            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33727                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33728            }
33729            HIL_CONTROLS_DATA::ID => {
33730                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33731            }
33732            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33733            HIL_OPTICAL_FLOW_DATA::ID => {
33734                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33735            }
33736            HIL_RC_INPUTS_RAW_DATA::ID => {
33737                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33738            }
33739            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33740            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33741            HIL_STATE_QUATERNION_DATA::ID => {
33742                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33743            }
33744            HOME_POSITION_DATA::ID => {
33745                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33746            }
33747            HYGROMETER_SENSOR_DATA::ID => {
33748                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33749            }
33750            ILLUMINATOR_STATUS_DATA::ID => {
33751                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33752            }
33753            ISBD_LINK_STATUS_DATA::ID => {
33754                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33755            }
33756            LANDING_TARGET_DATA::ID => {
33757                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33758            }
33759            LINK_NODE_STATUS_DATA::ID => {
33760                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33761            }
33762            LOCAL_POSITION_NED_DATA::ID => {
33763                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33764            }
33765            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33766                .map(Self::LOCAL_POSITION_NED_COV),
33767            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33768                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33769                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33770            }
33771            LOGGING_ACK_DATA::ID => {
33772                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33773            }
33774            LOGGING_DATA_DATA::ID => {
33775                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33776            }
33777            LOGGING_DATA_ACKED_DATA::ID => {
33778                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33779            }
33780            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33781            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33782            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33783            LOG_REQUEST_DATA_DATA::ID => {
33784                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33785            }
33786            LOG_REQUEST_END_DATA::ID => {
33787                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33788            }
33789            LOG_REQUEST_LIST_DATA::ID => {
33790                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33791            }
33792            MAG_CAL_REPORT_DATA::ID => {
33793                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33794            }
33795            MANUAL_CONTROL_DATA::ID => {
33796                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33797            }
33798            MANUAL_SETPOINT_DATA::ID => {
33799                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33800            }
33801            MEMORY_VECT_DATA::ID => {
33802                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33803            }
33804            MESSAGE_INTERVAL_DATA::ID => {
33805                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33806            }
33807            MISSION_ACK_DATA::ID => {
33808                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33809            }
33810            MISSION_CLEAR_ALL_DATA::ID => {
33811                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33812            }
33813            MISSION_COUNT_DATA::ID => {
33814                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33815            }
33816            MISSION_CURRENT_DATA::ID => {
33817                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33818            }
33819            MISSION_ITEM_DATA::ID => {
33820                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33821            }
33822            MISSION_ITEM_INT_DATA::ID => {
33823                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33824            }
33825            MISSION_ITEM_REACHED_DATA::ID => {
33826                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33827            }
33828            MISSION_REQUEST_DATA::ID => {
33829                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33830            }
33831            MISSION_REQUEST_INT_DATA::ID => {
33832                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33833            }
33834            MISSION_REQUEST_LIST_DATA::ID => {
33835                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33836            }
33837            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33838                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33839                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33840            }
33841            MISSION_SET_CURRENT_DATA::ID => {
33842                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33843            }
33844            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33845                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33846                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33847            }
33848            MOUNT_ORIENTATION_DATA::ID => {
33849                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33850            }
33851            NAMED_VALUE_FLOAT_DATA::ID => {
33852                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33853            }
33854            NAMED_VALUE_INT_DATA::ID => {
33855                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33856            }
33857            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33858                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33859            }
33860            OBSTACLE_DISTANCE_DATA::ID => {
33861                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33862            }
33863            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33864            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33865                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33866                    .map(Self::ONBOARD_COMPUTER_STATUS)
33867            }
33868            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33869                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33870                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33871            }
33872            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33873                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33874                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33875            }
33876            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33877                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33878            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33879                .map(Self::OPEN_DRONE_ID_LOCATION),
33880            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33881                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33882                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33883            }
33884            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33885                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33886                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33887            }
33888            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33889                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33890            }
33891            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33892                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33893            }
33894            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33895                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33896                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33897            }
33898            OPTICAL_FLOW_DATA::ID => {
33899                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33900            }
33901            OPTICAL_FLOW_RAD_DATA::ID => {
33902                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33903            }
33904            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33905                .map(Self::ORBIT_EXECUTION_STATUS),
33906            PARAM_EXT_ACK_DATA::ID => {
33907                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33908            }
33909            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33910                .map(Self::PARAM_EXT_REQUEST_LIST),
33911            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33912                .map(Self::PARAM_EXT_REQUEST_READ),
33913            PARAM_EXT_SET_DATA::ID => {
33914                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33915            }
33916            PARAM_EXT_VALUE_DATA::ID => {
33917                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33918            }
33919            PARAM_MAP_RC_DATA::ID => {
33920                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33921            }
33922            PARAM_REQUEST_LIST_DATA::ID => {
33923                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33924            }
33925            PARAM_REQUEST_READ_DATA::ID => {
33926                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33927            }
33928            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33929            PARAM_VALUE_DATA::ID => {
33930                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33931            }
33932            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33933            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33934            PLAY_TUNE_V2_DATA::ID => {
33935                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33936            }
33937            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33938                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33939                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33940            }
33941            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33942                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33943                    .map(Self::POSITION_TARGET_LOCAL_NED)
33944            }
33945            POWER_STATUS_DATA::ID => {
33946                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33947            }
33948            PROTOCOL_VERSION_DATA::ID => {
33949                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33950            }
33951            RADIO_STATUS_DATA::ID => {
33952                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33953            }
33954            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33955            RAW_PRESSURE_DATA::ID => {
33956                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33957            }
33958            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33959            RC_CHANNELS_DATA::ID => {
33960                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33961            }
33962            RC_CHANNELS_OVERRIDE_DATA::ID => {
33963                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33964            }
33965            RC_CHANNELS_RAW_DATA::ID => {
33966                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33967            }
33968            RC_CHANNELS_SCALED_DATA::ID => {
33969                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33970            }
33971            REQUEST_DATA_STREAM_DATA::ID => {
33972                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33973            }
33974            REQUEST_EVENT_DATA::ID => {
33975                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33976            }
33977            RESOURCE_REQUEST_DATA::ID => {
33978                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33979            }
33980            RESPONSE_EVENT_ERROR_DATA::ID => {
33981                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33982            }
33983            SAFETY_ALLOWED_AREA_DATA::ID => {
33984                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33985            }
33986            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33987                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33988                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33989            }
33990            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33991            SCALED_IMU2_DATA::ID => {
33992                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33993            }
33994            SCALED_IMU3_DATA::ID => {
33995                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33996            }
33997            SCALED_PRESSURE_DATA::ID => {
33998                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33999            }
34000            SCALED_PRESSURE2_DATA::ID => {
34001                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34002            }
34003            SCALED_PRESSURE3_DATA::ID => {
34004                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34005            }
34006            SCRIPT_COUNT_DATA::ID => {
34007                SCRIPT_COUNT_DATA::deser(version, payload).map(Self::SCRIPT_COUNT)
34008            }
34009            SCRIPT_CURRENT_DATA::ID => {
34010                SCRIPT_CURRENT_DATA::deser(version, payload).map(Self::SCRIPT_CURRENT)
34011            }
34012            SCRIPT_ITEM_DATA::ID => {
34013                SCRIPT_ITEM_DATA::deser(version, payload).map(Self::SCRIPT_ITEM)
34014            }
34015            SCRIPT_REQUEST_DATA::ID => {
34016                SCRIPT_REQUEST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST)
34017            }
34018            SCRIPT_REQUEST_LIST_DATA::ID => {
34019                SCRIPT_REQUEST_LIST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST_LIST)
34020            }
34021            SERIAL_CONTROL_DATA::ID => {
34022                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34023            }
34024            SERVO_OUTPUT_RAW_DATA::ID => {
34025                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34026            }
34027            SETUP_SIGNING_DATA::ID => {
34028                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34029            }
34030            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34031                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34032                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34033            }
34034            SET_ATTITUDE_TARGET_DATA::ID => {
34035                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34036            }
34037            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34038                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34039            }
34040            SET_HOME_POSITION_DATA::ID => {
34041                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34042            }
34043            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34044            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34045                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34046                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34047            }
34048            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34049                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34050                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34051            }
34052            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34053            SMART_BATTERY_INFO_DATA::ID => {
34054                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34055            }
34056            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34057            STORAGE_INFORMATION_DATA::ID => {
34058                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34059            }
34060            SUPPORTED_TUNES_DATA::ID => {
34061                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34062            }
34063            SYSTEM_TIME_DATA::ID => {
34064                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34065            }
34066            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34067            TERRAIN_CHECK_DATA::ID => {
34068                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34069            }
34070            TERRAIN_DATA_DATA::ID => {
34071                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34072            }
34073            TERRAIN_REPORT_DATA::ID => {
34074                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34075            }
34076            TERRAIN_REQUEST_DATA::ID => {
34077                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34078            }
34079            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34080            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34081                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34082                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34083            }
34084            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34085                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34086                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34087            }
34088            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34089                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34090                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34091            }
34092            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34093            UAVCAN_NODE_INFO_DATA::ID => {
34094                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34095            }
34096            UAVCAN_NODE_STATUS_DATA::ID => {
34097                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34098            }
34099            UTM_GLOBAL_POSITION_DATA::ID => {
34100                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34101            }
34102            V2_EXTENSION_DATA::ID => {
34103                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34104            }
34105            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34106            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34107            VICON_POSITION_ESTIMATE_DATA::ID => {
34108                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34109                    .map(Self::VICON_POSITION_ESTIMATE)
34110            }
34111            VIDEO_STREAM_INFORMATION_DATA::ID => {
34112                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34113                    .map(Self::VIDEO_STREAM_INFORMATION)
34114            }
34115            VIDEO_STREAM_STATUS_DATA::ID => {
34116                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34117            }
34118            VISION_POSITION_ESTIMATE_DATA::ID => {
34119                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34120                    .map(Self::VISION_POSITION_ESTIMATE)
34121            }
34122            VISION_SPEED_ESTIMATE_DATA::ID => {
34123                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34124            }
34125            WHEEL_DISTANCE_DATA::ID => {
34126                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34127            }
34128            WIFI_CONFIG_AP_DATA::ID => {
34129                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34130            }
34131            WINCH_STATUS_DATA::ID => {
34132                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34133            }
34134            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34135            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34136        }
34137    }
34138    fn message_name(&self) -> &'static str {
34139        match self {
34140            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34141            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34142            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34143            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34144            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34145            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34146            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34147            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34148            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34149            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34150            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34151            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34152                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34153            }
34154            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34155            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34156            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34157            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34158            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34159            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34160            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34161            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34162            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34163            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34164            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34165            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34166            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34167            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34168            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34169            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34170            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34171            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34172            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34173            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34174            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34175            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34176            Self::COLLISION(..) => COLLISION_DATA::NAME,
34177            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34178            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34179            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34180            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34181            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34182            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34183            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34184            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34185            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34186            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34187            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34188            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34189            Self::DEBUG(..) => DEBUG_DATA::NAME,
34190            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34191            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34192            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34193            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34194            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34195            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34196            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34197            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34198            Self::EVENT(..) => EVENT_DATA::NAME,
34199            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34200            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34201            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34202            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34203            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34204            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34205            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34206            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34207            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34208            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34209            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34210            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34211            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34212                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34213            }
34214            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34215            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34216            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34217            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34218            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34219            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34220            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34221            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34222            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34223            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34224            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34225            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34226            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34227            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34228            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34229            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34230            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34231            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34232            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34233            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34234            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34235            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34236            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34237            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34238            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34239            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34240            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34241            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34242            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34243            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34244            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34245            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34246            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34247            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34248            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34249                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34250            }
34251            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34252            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34253            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34254            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34255            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34256            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34257            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34258            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34259            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34260            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34261            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34262            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34263            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34264            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34265            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34266            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34267            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34268            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34269            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34270            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34271            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34272            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34273            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34274            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34275            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34276            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34277            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34278            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34279            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34280            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34281            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34282            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34283            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34284            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34285            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34286            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34287            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34288            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34289            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34290            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34291            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34292            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34293            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34294            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34295            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34296            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34297            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34298            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34299            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34300            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34301            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34302            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34303            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34304            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34305            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34306            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34307            Self::PING(..) => PING_DATA::NAME,
34308            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34309            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34310            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34311            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34312            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34313            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34314            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34315            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34316            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34317            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34318            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34319            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34320            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34321            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34322            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34323            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34324            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34325            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34326            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34327            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34328            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34329            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34330            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34331            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34332            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34333            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34334            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::NAME,
34335            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::NAME,
34336            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::NAME,
34337            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::NAME,
34338            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::NAME,
34339            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34340            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34341            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34342            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34343            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34344            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34345            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34346            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34347            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34348            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34349            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34350            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34351            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34352            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34353            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34354            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34355            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34356            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34357            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34358            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34359            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34360            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34361            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34362            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34363                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34364            }
34365            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34366                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34367            }
34368            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34369            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34370            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34371            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34372            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34373            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34374            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34375            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34376            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34377            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34378            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34379            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34380            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34381            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34382            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34383            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34384        }
34385    }
34386    fn message_id(&self) -> u32 {
34387        match self {
34388            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34389            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34390            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34391            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34392            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34393            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34394            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34395            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34396            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34397            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34398            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34399            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34400                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34401            }
34402            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34403            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34404            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34405            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34406            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34407            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34408            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34409            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34410            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34411            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34412            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34413            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34414            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34415            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34416            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34417            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34418            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34419            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34420            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34421            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34422            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34423            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34424            Self::COLLISION(..) => COLLISION_DATA::ID,
34425            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34426            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34427            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34428            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34429            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34430            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34431            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34432            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34433            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34434            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34435            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34436            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34437            Self::DEBUG(..) => DEBUG_DATA::ID,
34438            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34439            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34440            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34441            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34442            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34443            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34444            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34445            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34446            Self::EVENT(..) => EVENT_DATA::ID,
34447            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34448            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34449            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34450            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34451            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34452            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34453            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34454            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34455            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34456            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34457            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34458            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34459            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34460                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34461            }
34462            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34463            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34464            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34465            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34466            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34467            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34468            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34469            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34470            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34471            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34472            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34473            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34474            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34475            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34476            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34477            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34478            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34479            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34480            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34481            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34482            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34483            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34484            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34485            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34486            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34487            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34488            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34489            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34490            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34491            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34492            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34493            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34494            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34495            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34496            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34497                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34498            }
34499            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34500            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34501            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34502            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34503            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34504            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34505            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34506            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34507            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34508            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34509            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34510            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34511            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34512            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34513            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34514            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34515            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34516            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34517            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34518            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34519            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34520            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34521            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34522            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34523            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34524            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34525            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34526            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34527            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34528            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34529            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34530            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34531            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34532            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34533            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34534            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34535            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34536            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34537            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34538            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34539            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34540            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34541            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34542            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34543            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34544            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34545            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34546            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34547            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34548            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34549            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34550            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34551            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34552            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34553            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34554            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34555            Self::PING(..) => PING_DATA::ID,
34556            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34557            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34558            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34559            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34560            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34561            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34562            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34563            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34564            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34565            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34566            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34567            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34568            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34569            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34570            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34571            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34572            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34573            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34574            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34575            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34576            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34577            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34578            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34579            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34580            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34581            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34582            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::ID,
34583            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::ID,
34584            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::ID,
34585            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::ID,
34586            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::ID,
34587            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34588            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34589            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34590            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34591            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34592            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34593            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34594            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34595            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34596            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34597            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34598            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34599            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34600            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34601            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34602            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34603            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34604            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34605            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34606            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34607            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34608            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34609            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34610            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34611            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34612                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34613            }
34614            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34615            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34616            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34617            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34618            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34619            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34620            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34621            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34622            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34623            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34624            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34625            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34626            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34627            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34628            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34629            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34630        }
34631    }
34632    fn message_id_from_name(name: &str) -> Option<u32> {
34633        match name {
34634            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34635            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34636            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34637            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34638            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34639            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34640            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34641            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34642            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34643            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34644            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34645            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34646                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34647            }
34648            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34649            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34650            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34651            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34652            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34653            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34654            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34655            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34656            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34657            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34658            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34659            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34660            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34661            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34662            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34663            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34664            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34665            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34666            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34667            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34668            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34669            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34670            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34671            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34672            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34673            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34674            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34675            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34676            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34677            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34678            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34679            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34680            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34681            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34682            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34683            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34684            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34685            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34686            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34687            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34688            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34689            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34690            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34691            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34692            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34693            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34694            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34695            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34696            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34697            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34698            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34699            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34700            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34701                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34702            }
34703            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34704            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34705            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34706            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34707            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34708                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34709            }
34710            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34711            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34712            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34713            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34714            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34715                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34716            }
34717            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34718            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34719            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34720            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34721            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34722            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34723            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34724            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34725            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34726            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34727            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34728            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34729            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34730            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34731            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34732            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34733            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34734            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34735            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34736            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34737            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34738            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34739            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34740            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34741            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34742            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34743            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34744            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34745            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34746            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34747                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34748            }
34749            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34750            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34751            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34752            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34753            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34754            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34755            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34756            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34757            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34758            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34759            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34760            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34761            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34762            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34763            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34764            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34765            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34766            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34767            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34768            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34769            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34770            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34771            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34772            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34773            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34774            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34775            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34776            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34777            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34778            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34779            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34780            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34781            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34782            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34783            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34784            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34785            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34786            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34787            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34788            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34789            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34790            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34791            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34792            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34793            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34794            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34795            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34796            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34797            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34798            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34799            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34800            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34801            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34802            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34803            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34804            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34805            PING_DATA::NAME => Some(PING_DATA::ID),
34806            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34807            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34808            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34809            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34810            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34811            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34812            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34813            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34814            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34815            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34816            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34817            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34818            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34819            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34820            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34821            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34822            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34823            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34824            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34825            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34826            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34827            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34828            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34829            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34830            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34831            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34832            SCRIPT_COUNT_DATA::NAME => Some(SCRIPT_COUNT_DATA::ID),
34833            SCRIPT_CURRENT_DATA::NAME => Some(SCRIPT_CURRENT_DATA::ID),
34834            SCRIPT_ITEM_DATA::NAME => Some(SCRIPT_ITEM_DATA::ID),
34835            SCRIPT_REQUEST_DATA::NAME => Some(SCRIPT_REQUEST_DATA::ID),
34836            SCRIPT_REQUEST_LIST_DATA::NAME => Some(SCRIPT_REQUEST_LIST_DATA::ID),
34837            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34838            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34839            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34840            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34841            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34842            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34843            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34844            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34845            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34846                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34847            }
34848            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34849                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34850            }
34851            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34852            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34853            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34854            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34855            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34856            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34857            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34858            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34859            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34860            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34861            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34862            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34863            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34864            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34865                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34866            }
34867            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34868                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34869            }
34870            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34871            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34872            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34873            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34874            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34875            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34876            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34877            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34878            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34879            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34880            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34881            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34882            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34883            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34884            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34885            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34886            _ => None,
34887        }
34888    }
34889    fn default_message_from_id(id: u32) -> Option<Self> {
34890        match id {
34891            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34892                ACTUATOR_CONTROL_TARGET_DATA::default(),
34893            )),
34894            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34895                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34896            )),
34897            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34898            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34899            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34900            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34901            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34902                ATTITUDE_QUATERNION_DATA::default(),
34903            )),
34904            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34905                ATTITUDE_QUATERNION_COV_DATA::default(),
34906            )),
34907            ATTITUDE_TARGET_DATA::ID => {
34908                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34909            }
34910            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34911            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34912            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34913                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34914                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34915                ))
34916            }
34917            AUTOPILOT_VERSION_DATA::ID => {
34918                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34919            }
34920            AVAILABLE_MODES_DATA::ID => {
34921                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34922            }
34923            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34924                AVAILABLE_MODES_MONITOR_DATA::default(),
34925            )),
34926            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34927            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34928            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34929            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34930                CAMERA_CAPTURE_STATUS_DATA::default(),
34931            )),
34932            CAMERA_FOV_STATUS_DATA::ID => {
34933                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34934            }
34935            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34936                CAMERA_IMAGE_CAPTURED_DATA::default(),
34937            )),
34938            CAMERA_INFORMATION_DATA::ID => {
34939                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34940            }
34941            CAMERA_SETTINGS_DATA::ID => {
34942                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34943            }
34944            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34945                CAMERA_THERMAL_RANGE_DATA::default(),
34946            )),
34947            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34948                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34949            )),
34950            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34951                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34952            )),
34953            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34954            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34955            CAN_FILTER_MODIFY_DATA::ID => {
34956                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34957            }
34958            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34959            CELLULAR_CONFIG_DATA::ID => {
34960                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34961            }
34962            CELLULAR_STATUS_DATA::ID => {
34963                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34964            }
34965            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34966                CHANGE_OPERATOR_CONTROL_DATA::default(),
34967            )),
34968            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34969                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34970            )),
34971            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34972            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34973            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34974            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34975            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34976            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34977                COMPONENT_INFORMATION_DATA::default(),
34978            )),
34979            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34980                COMPONENT_INFORMATION_BASIC_DATA::default(),
34981            )),
34982            COMPONENT_METADATA_DATA::ID => {
34983                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34984            }
34985            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34986                CONTROL_SYSTEM_STATE_DATA::default(),
34987            )),
34988            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34989                CURRENT_EVENT_SEQUENCE_DATA::default(),
34990            )),
34991            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34992            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34993            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34994                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34995            )),
34996            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34997            DEBUG_FLOAT_ARRAY_DATA::ID => {
34998                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34999            }
35000            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35001            DISTANCE_SENSOR_DATA::ID => {
35002                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35003            }
35004            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35005            ENCAPSULATED_DATA_DATA::ID => {
35006                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35007            }
35008            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35009            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35010            ESTIMATOR_STATUS_DATA::ID => {
35011                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35012            }
35013            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35014            EXTENDED_SYS_STATE_DATA::ID => {
35015                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35016            }
35017            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35018            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35019                FILE_TRANSFER_PROTOCOL_DATA::default(),
35020            )),
35021            FLIGHT_INFORMATION_DATA::ID => {
35022                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35023            }
35024            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35025            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35026            GENERATOR_STATUS_DATA::ID => {
35027                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35028            }
35029            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35030                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35031            )),
35032            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35033                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35034            )),
35035            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35036                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35037            )),
35038            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35039                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35040            )),
35041            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35042                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35043            )),
35044            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35045                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35046                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35047                ))
35048            }
35049            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35050                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35051            )),
35052            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35053                GIMBAL_MANAGER_STATUS_DATA::default(),
35054            )),
35055            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35056                GLOBAL_POSITION_INT_DATA::default(),
35057            )),
35058            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35059                GLOBAL_POSITION_INT_COV_DATA::default(),
35060            )),
35061            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35062                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35063                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35064                ))
35065            }
35066            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35067            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35068            GPS_GLOBAL_ORIGIN_DATA::ID => {
35069                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35070            }
35071            GPS_INJECT_DATA_DATA::ID => {
35072                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35073            }
35074            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35075            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35076            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35077            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35078            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35079            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35080            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35081            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35082            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35083            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35084                HIL_ACTUATOR_CONTROLS_DATA::default(),
35085            )),
35086            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35087            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35088            HIL_OPTICAL_FLOW_DATA::ID => {
35089                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35090            }
35091            HIL_RC_INPUTS_RAW_DATA::ID => {
35092                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35093            }
35094            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35095            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35096            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35097                HIL_STATE_QUATERNION_DATA::default(),
35098            )),
35099            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35100            HYGROMETER_SENSOR_DATA::ID => {
35101                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35102            }
35103            ILLUMINATOR_STATUS_DATA::ID => {
35104                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35105            }
35106            ISBD_LINK_STATUS_DATA::ID => {
35107                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35108            }
35109            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35110            LINK_NODE_STATUS_DATA::ID => {
35111                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35112            }
35113            LOCAL_POSITION_NED_DATA::ID => {
35114                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35115            }
35116            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35117                LOCAL_POSITION_NED_COV_DATA::default(),
35118            )),
35119            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35120                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35121                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35122                ))
35123            }
35124            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35125            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35126            LOGGING_DATA_ACKED_DATA::ID => {
35127                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35128            }
35129            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35130            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35131            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35132            LOG_REQUEST_DATA_DATA::ID => {
35133                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35134            }
35135            LOG_REQUEST_END_DATA::ID => {
35136                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35137            }
35138            LOG_REQUEST_LIST_DATA::ID => {
35139                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35140            }
35141            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35142            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35143            MANUAL_SETPOINT_DATA::ID => {
35144                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35145            }
35146            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35147            MESSAGE_INTERVAL_DATA::ID => {
35148                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35149            }
35150            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35151            MISSION_CLEAR_ALL_DATA::ID => {
35152                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35153            }
35154            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35155            MISSION_CURRENT_DATA::ID => {
35156                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35157            }
35158            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35159            MISSION_ITEM_INT_DATA::ID => {
35160                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35161            }
35162            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35163                MISSION_ITEM_REACHED_DATA::default(),
35164            )),
35165            MISSION_REQUEST_DATA::ID => {
35166                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35167            }
35168            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35169                MISSION_REQUEST_INT_DATA::default(),
35170            )),
35171            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35172                MISSION_REQUEST_LIST_DATA::default(),
35173            )),
35174            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35175                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35176            )),
35177            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35178                MISSION_SET_CURRENT_DATA::default(),
35179            )),
35180            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35181                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35182            )),
35183            MOUNT_ORIENTATION_DATA::ID => {
35184                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35185            }
35186            NAMED_VALUE_FLOAT_DATA::ID => {
35187                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35188            }
35189            NAMED_VALUE_INT_DATA::ID => {
35190                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35191            }
35192            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35193                NAV_CONTROLLER_OUTPUT_DATA::default(),
35194            )),
35195            OBSTACLE_DISTANCE_DATA::ID => {
35196                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35197            }
35198            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35199            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35200                ONBOARD_COMPUTER_STATUS_DATA::default(),
35201            )),
35202            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35203                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35204            )),
35205            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35206                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35207            )),
35208            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35209                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35210            )),
35211            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35212                OPEN_DRONE_ID_LOCATION_DATA::default(),
35213            )),
35214            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35215                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35216            )),
35217            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35218                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35219            )),
35220            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35221                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35222            )),
35223            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35224                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35225            )),
35226            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35227                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35228            )),
35229            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35230            OPTICAL_FLOW_RAD_DATA::ID => {
35231                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35232            }
35233            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35234                ORBIT_EXECUTION_STATUS_DATA::default(),
35235            )),
35236            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35237            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35238                PARAM_EXT_REQUEST_LIST_DATA::default(),
35239            )),
35240            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35241                PARAM_EXT_REQUEST_READ_DATA::default(),
35242            )),
35243            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35244            PARAM_EXT_VALUE_DATA::ID => {
35245                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35246            }
35247            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35248            PARAM_REQUEST_LIST_DATA::ID => {
35249                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35250            }
35251            PARAM_REQUEST_READ_DATA::ID => {
35252                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35253            }
35254            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35255            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35256            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35257            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35258            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35259            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35260                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35261            )),
35262            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35263                POSITION_TARGET_LOCAL_NED_DATA::default(),
35264            )),
35265            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35266            PROTOCOL_VERSION_DATA::ID => {
35267                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35268            }
35269            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35270            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35271            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35272            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35273            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35274            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35275                RC_CHANNELS_OVERRIDE_DATA::default(),
35276            )),
35277            RC_CHANNELS_RAW_DATA::ID => {
35278                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35279            }
35280            RC_CHANNELS_SCALED_DATA::ID => {
35281                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35282            }
35283            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35284                REQUEST_DATA_STREAM_DATA::default(),
35285            )),
35286            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35287            RESOURCE_REQUEST_DATA::ID => {
35288                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35289            }
35290            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35291                RESPONSE_EVENT_ERROR_DATA::default(),
35292            )),
35293            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35294                SAFETY_ALLOWED_AREA_DATA::default(),
35295            )),
35296            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35297                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35298            )),
35299            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35300            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35301            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35302            SCALED_PRESSURE_DATA::ID => {
35303                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35304            }
35305            SCALED_PRESSURE2_DATA::ID => {
35306                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35307            }
35308            SCALED_PRESSURE3_DATA::ID => {
35309                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35310            }
35311            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::default())),
35312            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::default())),
35313            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::default())),
35314            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::default())),
35315            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
35316                SCRIPT_REQUEST_LIST_DATA::default(),
35317            )),
35318            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35319            SERVO_OUTPUT_RAW_DATA::ID => {
35320                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35321            }
35322            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35323            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35324                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35325            )),
35326            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35327                SET_ATTITUDE_TARGET_DATA::default(),
35328            )),
35329            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35330                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35331            )),
35332            SET_HOME_POSITION_DATA::ID => {
35333                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35334            }
35335            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35336            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35337                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35338            )),
35339            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35340                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35341            )),
35342            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35343            SMART_BATTERY_INFO_DATA::ID => {
35344                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35345            }
35346            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35347            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35348                STORAGE_INFORMATION_DATA::default(),
35349            )),
35350            SUPPORTED_TUNES_DATA::ID => {
35351                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35352            }
35353            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35354            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35355            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35356            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35357            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35358            TERRAIN_REQUEST_DATA::ID => {
35359                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35360            }
35361            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35362            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35363                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35364            )),
35365            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35366                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35367                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35368                ))
35369            }
35370            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35371                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35372                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35373                ))
35374            }
35375            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35376            UAVCAN_NODE_INFO_DATA::ID => {
35377                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35378            }
35379            UAVCAN_NODE_STATUS_DATA::ID => {
35380                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35381            }
35382            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35383                UTM_GLOBAL_POSITION_DATA::default(),
35384            )),
35385            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35386            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35387            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35388            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35389                VICON_POSITION_ESTIMATE_DATA::default(),
35390            )),
35391            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35392                VIDEO_STREAM_INFORMATION_DATA::default(),
35393            )),
35394            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35395                VIDEO_STREAM_STATUS_DATA::default(),
35396            )),
35397            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35398                VISION_POSITION_ESTIMATE_DATA::default(),
35399            )),
35400            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35401                VISION_SPEED_ESTIMATE_DATA::default(),
35402            )),
35403            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35404            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35405            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35406            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35407            _ => None,
35408        }
35409    }
35410    #[cfg(feature = "arbitrary")]
35411    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35412        match id {
35413            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35414                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35415            )),
35416            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35417                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35418            )),
35419            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35420            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35421            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35422            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35423            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35424                ATTITUDE_QUATERNION_DATA::random(rng),
35425            )),
35426            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35427                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35428            )),
35429            ATTITUDE_TARGET_DATA::ID => {
35430                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35431            }
35432            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35433            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35434            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35435                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35436                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35437                ))
35438            }
35439            AUTOPILOT_VERSION_DATA::ID => {
35440                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35441            }
35442            AVAILABLE_MODES_DATA::ID => {
35443                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35444            }
35445            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35446                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35447            )),
35448            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35449            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35450            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35451            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35452                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35453            )),
35454            CAMERA_FOV_STATUS_DATA::ID => {
35455                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35456            }
35457            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35458                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35459            )),
35460            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35461                CAMERA_INFORMATION_DATA::random(rng),
35462            )),
35463            CAMERA_SETTINGS_DATA::ID => {
35464                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35465            }
35466            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35467                CAMERA_THERMAL_RANGE_DATA::random(rng),
35468            )),
35469            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35470                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35471            )),
35472            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35473                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35474            )),
35475            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35476            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35477            CAN_FILTER_MODIFY_DATA::ID => {
35478                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35479            }
35480            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35481            CELLULAR_CONFIG_DATA::ID => {
35482                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35483            }
35484            CELLULAR_STATUS_DATA::ID => {
35485                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35486            }
35487            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35488                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35489            )),
35490            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35491                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35492            )),
35493            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35494            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35495            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35496            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35497            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35498            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35499                COMPONENT_INFORMATION_DATA::random(rng),
35500            )),
35501            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35502                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35503            )),
35504            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35505                COMPONENT_METADATA_DATA::random(rng),
35506            )),
35507            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35508                CONTROL_SYSTEM_STATE_DATA::random(rng),
35509            )),
35510            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35511                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35512            )),
35513            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35514            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35515            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35516                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35517            )),
35518            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35519            DEBUG_FLOAT_ARRAY_DATA::ID => {
35520                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35521            }
35522            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35523            DISTANCE_SENSOR_DATA::ID => {
35524                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35525            }
35526            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35527            ENCAPSULATED_DATA_DATA::ID => {
35528                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35529            }
35530            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35531            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35532            ESTIMATOR_STATUS_DATA::ID => {
35533                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35534            }
35535            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35536            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35537                EXTENDED_SYS_STATE_DATA::random(rng),
35538            )),
35539            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35540            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35541                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35542            )),
35543            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35544                FLIGHT_INFORMATION_DATA::random(rng),
35545            )),
35546            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35547            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35548            GENERATOR_STATUS_DATA::ID => {
35549                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35550            }
35551            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35552                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35553            )),
35554            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35555                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35556            )),
35557            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35558                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35559            )),
35560            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35561                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35562            )),
35563            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35564                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35565            )),
35566            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35567                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35568                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35569                ))
35570            }
35571            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35572                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35573            )),
35574            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35575                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35576            )),
35577            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35578                GLOBAL_POSITION_INT_DATA::random(rng),
35579            )),
35580            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35581                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35582            )),
35583            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35584                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35585                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35586                ))
35587            }
35588            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35589            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35590            GPS_GLOBAL_ORIGIN_DATA::ID => {
35591                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35592            }
35593            GPS_INJECT_DATA_DATA::ID => {
35594                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35595            }
35596            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35597            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35598            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35599            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35600            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35601            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35602            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35603            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35604            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35605            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35606                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35607            )),
35608            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35609            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35610            HIL_OPTICAL_FLOW_DATA::ID => {
35611                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35612            }
35613            HIL_RC_INPUTS_RAW_DATA::ID => {
35614                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35615            }
35616            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35617            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35618            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35619                HIL_STATE_QUATERNION_DATA::random(rng),
35620            )),
35621            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35622            HYGROMETER_SENSOR_DATA::ID => {
35623                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35624            }
35625            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35626                ILLUMINATOR_STATUS_DATA::random(rng),
35627            )),
35628            ISBD_LINK_STATUS_DATA::ID => {
35629                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35630            }
35631            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35632            LINK_NODE_STATUS_DATA::ID => {
35633                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35634            }
35635            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35636                LOCAL_POSITION_NED_DATA::random(rng),
35637            )),
35638            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35639                LOCAL_POSITION_NED_COV_DATA::random(rng),
35640            )),
35641            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35642                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35643                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35644                ))
35645            }
35646            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35647            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35648            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35649                LOGGING_DATA_ACKED_DATA::random(rng),
35650            )),
35651            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35652            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35653            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35654            LOG_REQUEST_DATA_DATA::ID => {
35655                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35656            }
35657            LOG_REQUEST_END_DATA::ID => {
35658                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35659            }
35660            LOG_REQUEST_LIST_DATA::ID => {
35661                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35662            }
35663            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35664            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35665            MANUAL_SETPOINT_DATA::ID => {
35666                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35667            }
35668            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35669            MESSAGE_INTERVAL_DATA::ID => {
35670                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35671            }
35672            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35673            MISSION_CLEAR_ALL_DATA::ID => {
35674                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35675            }
35676            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35677            MISSION_CURRENT_DATA::ID => {
35678                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35679            }
35680            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35681            MISSION_ITEM_INT_DATA::ID => {
35682                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35683            }
35684            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35685                MISSION_ITEM_REACHED_DATA::random(rng),
35686            )),
35687            MISSION_REQUEST_DATA::ID => {
35688                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35689            }
35690            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35691                MISSION_REQUEST_INT_DATA::random(rng),
35692            )),
35693            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35694                MISSION_REQUEST_LIST_DATA::random(rng),
35695            )),
35696            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35697                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35698            )),
35699            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35700                MISSION_SET_CURRENT_DATA::random(rng),
35701            )),
35702            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35703                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35704            )),
35705            MOUNT_ORIENTATION_DATA::ID => {
35706                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35707            }
35708            NAMED_VALUE_FLOAT_DATA::ID => {
35709                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35710            }
35711            NAMED_VALUE_INT_DATA::ID => {
35712                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35713            }
35714            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35715                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35716            )),
35717            OBSTACLE_DISTANCE_DATA::ID => {
35718                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35719            }
35720            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35721            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35722                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35723            )),
35724            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35725                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35726            )),
35727            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35728                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35729            )),
35730            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35731                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35732            )),
35733            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35734                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35735            )),
35736            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35737                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35738            )),
35739            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35740                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35741            )),
35742            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35743                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35744            )),
35745            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35746                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35747            )),
35748            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35749                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35750            )),
35751            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35752            OPTICAL_FLOW_RAD_DATA::ID => {
35753                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35754            }
35755            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35756                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35757            )),
35758            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35759            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35760                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35761            )),
35762            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35763                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35764            )),
35765            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35766            PARAM_EXT_VALUE_DATA::ID => {
35767                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35768            }
35769            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35770            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35771                PARAM_REQUEST_LIST_DATA::random(rng),
35772            )),
35773            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35774                PARAM_REQUEST_READ_DATA::random(rng),
35775            )),
35776            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35777            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35778            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35779            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35780            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35781            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35782                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35783            )),
35784            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35785                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35786            )),
35787            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35788            PROTOCOL_VERSION_DATA::ID => {
35789                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35790            }
35791            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35792            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35793            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35794            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35795            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35796            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35797                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35798            )),
35799            RC_CHANNELS_RAW_DATA::ID => {
35800                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35801            }
35802            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35803                RC_CHANNELS_SCALED_DATA::random(rng),
35804            )),
35805            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35806                REQUEST_DATA_STREAM_DATA::random(rng),
35807            )),
35808            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35809            RESOURCE_REQUEST_DATA::ID => {
35810                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35811            }
35812            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35813                RESPONSE_EVENT_ERROR_DATA::random(rng),
35814            )),
35815            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35816                SAFETY_ALLOWED_AREA_DATA::random(rng),
35817            )),
35818            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35819                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35820            )),
35821            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35822            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35823            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35824            SCALED_PRESSURE_DATA::ID => {
35825                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35826            }
35827            SCALED_PRESSURE2_DATA::ID => {
35828                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35829            }
35830            SCALED_PRESSURE3_DATA::ID => {
35831                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35832            }
35833            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::random(rng))),
35834            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::random(rng))),
35835            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::random(rng))),
35836            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::random(rng))),
35837            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
35838                SCRIPT_REQUEST_LIST_DATA::random(rng),
35839            )),
35840            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35841            SERVO_OUTPUT_RAW_DATA::ID => {
35842                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35843            }
35844            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35845            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35846                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35847            )),
35848            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35849                SET_ATTITUDE_TARGET_DATA::random(rng),
35850            )),
35851            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35852                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35853            )),
35854            SET_HOME_POSITION_DATA::ID => {
35855                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35856            }
35857            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35858            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35859                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35860            )),
35861            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35862                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35863            )),
35864            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35865            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35866                SMART_BATTERY_INFO_DATA::random(rng),
35867            )),
35868            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35869            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35870                STORAGE_INFORMATION_DATA::random(rng),
35871            )),
35872            SUPPORTED_TUNES_DATA::ID => {
35873                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35874            }
35875            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35876            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35877            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35878            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35879            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35880            TERRAIN_REQUEST_DATA::ID => {
35881                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35882            }
35883            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35884            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35885                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35886            )),
35887            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35888                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35889                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35890                ))
35891            }
35892            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35893                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35894                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35895                ))
35896            }
35897            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35898            UAVCAN_NODE_INFO_DATA::ID => {
35899                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35900            }
35901            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35902                UAVCAN_NODE_STATUS_DATA::random(rng),
35903            )),
35904            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35905                UTM_GLOBAL_POSITION_DATA::random(rng),
35906            )),
35907            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35908            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35909            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35910            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35911                VICON_POSITION_ESTIMATE_DATA::random(rng),
35912            )),
35913            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35914                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35915            )),
35916            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35917                VIDEO_STREAM_STATUS_DATA::random(rng),
35918            )),
35919            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35920                VISION_POSITION_ESTIMATE_DATA::random(rng),
35921            )),
35922            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35923                VISION_SPEED_ESTIMATE_DATA::random(rng),
35924            )),
35925            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35926            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35927            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35928            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35929            _ => None,
35930        }
35931    }
35932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35933        match self {
35934            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35935            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35936            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35937            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35938            Self::ALTITUDE(body) => body.ser(version, bytes),
35939            Self::ATTITUDE(body) => body.ser(version, bytes),
35940            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35941            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35942            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35943            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35944            Self::AUTH_KEY(body) => body.ser(version, bytes),
35945            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35946            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35947            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35948            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35949            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35950            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35951            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35952            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35953            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35954            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35955            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35956            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35957            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35958            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35959            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35960            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35961            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35962            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35963            Self::CAN_FRAME(body) => body.ser(version, bytes),
35964            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35965            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35966            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35967            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35968            Self::COLLISION(body) => body.ser(version, bytes),
35969            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35970            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35971            Self::COMMAND_INT(body) => body.ser(version, bytes),
35972            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35973            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35974            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35975            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35976            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35977            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35978            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35979            Self::DATA_STREAM(body) => body.ser(version, bytes),
35980            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35981            Self::DEBUG(body) => body.ser(version, bytes),
35982            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35983            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35984            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35985            Self::EFI_STATUS(body) => body.ser(version, bytes),
35986            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35987            Self::ESC_INFO(body) => body.ser(version, bytes),
35988            Self::ESC_STATUS(body) => body.ser(version, bytes),
35989            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35990            Self::EVENT(body) => body.ser(version, bytes),
35991            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35992            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35993            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35994            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35995            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35996            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35997            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
35998            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
35999            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36000            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36001            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36002            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36003            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36004            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36005            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36006            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36007            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36008            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36009            Self::GPS2_RAW(body) => body.ser(version, bytes),
36010            Self::GPS2_RTK(body) => body.ser(version, bytes),
36011            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36012            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36013            Self::GPS_INPUT(body) => body.ser(version, bytes),
36014            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36015            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36016            Self::GPS_RTK(body) => body.ser(version, bytes),
36017            Self::GPS_STATUS(body) => body.ser(version, bytes),
36018            Self::HEARTBEAT(body) => body.ser(version, bytes),
36019            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36020            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36021            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36022            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36023            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36024            Self::HIL_GPS(body) => body.ser(version, bytes),
36025            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36026            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36027            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36028            Self::HIL_STATE(body) => body.ser(version, bytes),
36029            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36030            Self::HOME_POSITION(body) => body.ser(version, bytes),
36031            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36032            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36033            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36034            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36035            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36036            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36037            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36038            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36039            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36040            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36041            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36042            Self::LOG_DATA(body) => body.ser(version, bytes),
36043            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36044            Self::LOG_ERASE(body) => body.ser(version, bytes),
36045            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36046            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36047            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36048            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36049            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36050            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36051            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36052            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36053            Self::MISSION_ACK(body) => body.ser(version, bytes),
36054            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36055            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36056            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36057            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36058            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36059            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36060            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36061            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36062            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36063            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36064            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36065            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36066            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36067            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36068            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36069            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36070            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36071            Self::ODOMETRY(body) => body.ser(version, bytes),
36072            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36073            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36074            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36075            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36076            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36077            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36078            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36079            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36080            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36081            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36082            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36083            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36084            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36085            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36086            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36087            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36088            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36089            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36090            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36091            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36092            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36093            Self::PARAM_SET(body) => body.ser(version, bytes),
36094            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36095            Self::PING(body) => body.ser(version, bytes),
36096            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36097            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36098            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36099            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36100            Self::POWER_STATUS(body) => body.ser(version, bytes),
36101            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36102            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36103            Self::RAW_IMU(body) => body.ser(version, bytes),
36104            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36105            Self::RAW_RPM(body) => body.ser(version, bytes),
36106            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36107            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36108            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36109            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36110            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36111            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36112            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36113            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36114            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36115            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36116            Self::SCALED_IMU(body) => body.ser(version, bytes),
36117            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36118            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36119            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36120            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36121            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36122            Self::SCRIPT_COUNT(body) => body.ser(version, bytes),
36123            Self::SCRIPT_CURRENT(body) => body.ser(version, bytes),
36124            Self::SCRIPT_ITEM(body) => body.ser(version, bytes),
36125            Self::SCRIPT_REQUEST(body) => body.ser(version, bytes),
36126            Self::SCRIPT_REQUEST_LIST(body) => body.ser(version, bytes),
36127            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36128            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36129            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36130            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36131            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36132            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36133            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36134            Self::SET_MODE(body) => body.ser(version, bytes),
36135            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36136            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36137            Self::SIM_STATE(body) => body.ser(version, bytes),
36138            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36139            Self::STATUSTEXT(body) => body.ser(version, bytes),
36140            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36141            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36142            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36143            Self::SYS_STATUS(body) => body.ser(version, bytes),
36144            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36145            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36146            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36147            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36148            Self::TIMESYNC(body) => body.ser(version, bytes),
36149            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36150            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36151            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36152            Self::TUNNEL(body) => body.ser(version, bytes),
36153            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36154            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36155            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36156            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36157            Self::VFR_HUD(body) => body.ser(version, bytes),
36158            Self::VIBRATION(body) => body.ser(version, bytes),
36159            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36160            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36161            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36162            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36163            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36164            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36165            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36166            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36167            Self::WIND_COV(body) => body.ser(version, bytes),
36168        }
36169    }
36170    fn extra_crc(id: u32) -> u8 {
36171        match id {
36172            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36173            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36174            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36175            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36176            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36177            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36178            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36179            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36180            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36181            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36182            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36183            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36184                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36185            }
36186            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36187            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36188            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36189            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36190            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36191            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36192            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36193            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36194            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36195            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36196            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36197            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36198            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36199            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36200            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36201            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36202            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36203            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36204            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36205            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36206            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36207            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36208            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36209            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36210            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36211            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36212            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36213            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36214            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36215            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36216            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36217            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36218            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36219            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36220            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36221            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36222            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36223            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36224            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36225            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36226            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36227            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36228            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36229            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36230            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36231            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36232            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36233            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36234            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36235            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36236            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36237            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36238            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36239            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36240            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36241            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36242            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36243            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36244                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36245            }
36246            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36247            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36248            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36249            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36250            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36251                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36252            }
36253            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36254            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36255            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36256            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36257            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36258            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36259            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36260            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36261            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36262            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36263            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36264            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36265            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36266            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36267            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36268            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36269            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36270            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36271            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36272            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36273            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36274            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36275            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36276            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36277            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36278            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36279            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36280            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36281            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36282            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36283                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36284            }
36285            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36286            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36287            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36288            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36289            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36290            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36291            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36292            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36293            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36294            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36295            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36296            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36297            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36298            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36299            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36300            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36301            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36302            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36303            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36304            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36305            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36306            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36307            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36308            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36309            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36310            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36311            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36312            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36313            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36314            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36315            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36316            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36317            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36318            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36319            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36320            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36321            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36322            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36323            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36324            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36325            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36326            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36327            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36328            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36329            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36330            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36331            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36332            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36333            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36334            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36335            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36336            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36337            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36338            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36339            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36340            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36341            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36342            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36343            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36344            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36345            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36346            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36347            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36348            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36349            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36350            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36351            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36352            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36353            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36354            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36355            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36356            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36357            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36358            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36359            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36360            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36361            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36362            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36363            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36364            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36365            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36366            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36367            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36368            SCRIPT_COUNT_DATA::ID => SCRIPT_COUNT_DATA::EXTRA_CRC,
36369            SCRIPT_CURRENT_DATA::ID => SCRIPT_CURRENT_DATA::EXTRA_CRC,
36370            SCRIPT_ITEM_DATA::ID => SCRIPT_ITEM_DATA::EXTRA_CRC,
36371            SCRIPT_REQUEST_DATA::ID => SCRIPT_REQUEST_DATA::EXTRA_CRC,
36372            SCRIPT_REQUEST_LIST_DATA::ID => SCRIPT_REQUEST_LIST_DATA::EXTRA_CRC,
36373            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36374            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36375            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36376            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36377            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36378            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36379            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36380            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36381            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36382                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36383            }
36384            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36385            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36386            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36387            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36388            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36389            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36390            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36391            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36392            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36393            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36394            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36395            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36396            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36397            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36398            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36399                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36400            }
36401            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36402                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36403            }
36404            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36405            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36406            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36407            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36408            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36409            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36410            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36411            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36412            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36413            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36414            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36415            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36416            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36417            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36418            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36419            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36420            _ => 0,
36421        }
36422    }
36423    fn target_system_id(&self) -> Option<u8> {
36424        match self {
36425            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36426            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36427            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36428            Self::CAN_FRAME(inner) => Some(inner.target_system),
36429            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36430            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36431            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36432            Self::COMMAND_INT(inner) => Some(inner.target_system),
36433            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36434            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36435            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36436            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36437            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36438            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36439            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36440            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36441            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36442            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36443            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36444            Self::LOG_ERASE(inner) => Some(inner.target_system),
36445            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36446            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36447            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36448            Self::MISSION_ACK(inner) => Some(inner.target_system),
36449            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36450            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36451            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36452            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36453            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36454            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36455            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36456            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36457            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36458            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36459            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36460            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36461            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36462            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36463            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36464            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36465            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36466            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36467            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36468            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36469            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36470            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36471            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36472            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36473            Self::PARAM_SET(inner) => Some(inner.target_system),
36474            Self::PING(inner) => Some(inner.target_system),
36475            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36476            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36477            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36478            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36479            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36480            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36481            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36482            Self::SCRIPT_COUNT(inner) => Some(inner.target_system),
36483            Self::SCRIPT_ITEM(inner) => Some(inner.target_system),
36484            Self::SCRIPT_REQUEST(inner) => Some(inner.target_system),
36485            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_system),
36486            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36487            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36488            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36489            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36490            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36491            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36492            Self::SET_MODE(inner) => Some(inner.target_system),
36493            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36494            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36495            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36496            Self::TIMESYNC(inner) => Some(inner.target_system),
36497            Self::TUNNEL(inner) => Some(inner.target_system),
36498            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36499            _ => None,
36500        }
36501    }
36502    fn target_component_id(&self) -> Option<u8> {
36503        match self {
36504            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36505            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36506            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36507            Self::CAN_FRAME(inner) => Some(inner.target_component),
36508            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36509            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36510            Self::COMMAND_INT(inner) => Some(inner.target_component),
36511            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36512            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36513            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36514            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36515            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36516            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36517            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36518            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36519            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36520            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36521            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36522            Self::LOG_ERASE(inner) => Some(inner.target_component),
36523            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36524            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36525            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36526            Self::MISSION_ACK(inner) => Some(inner.target_component),
36527            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36528            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36529            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36530            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36531            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36532            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36533            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36534            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36535            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36536            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36537            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36538            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36539            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36540            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36541            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36542            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36543            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36544            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36545            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36546            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36547            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36548            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36549            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36550            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36551            Self::PARAM_SET(inner) => Some(inner.target_component),
36552            Self::PING(inner) => Some(inner.target_component),
36553            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36554            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36555            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36556            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36557            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36558            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36559            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36560            Self::SCRIPT_COUNT(inner) => Some(inner.target_component),
36561            Self::SCRIPT_ITEM(inner) => Some(inner.target_component),
36562            Self::SCRIPT_REQUEST(inner) => Some(inner.target_component),
36563            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_component),
36564            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36565            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36566            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36567            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36568            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36569            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36570            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36571            Self::TIMESYNC(inner) => Some(inner.target_component),
36572            Self::TUNNEL(inner) => Some(inner.target_component),
36573            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36574            _ => None,
36575        }
36576    }
36577}